Mobile app version of vmapp.org
Login or Join
Mendez628

: How to redirect to any domain Simple question I own a domain and from that domain i want to redirect users who opens my old domain URL to my New Domain URL.

@Mendez628

Posted in: #Redirects #WebTraffic

Simple question
I own a domain and from that domain i want to redirect users who opens my old domain URL to my New Domain URL.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Mendez628

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cugini213

There's only one way to redirect a client - and that's by issuing a HTTP 3xx response to their browser that contains a redirect URL.

In this case, you'll want to issue a 301 code HTTP response (Permanent redirect) that contains the URL for your new domain. Only a HTTP server can do this.

Some DNS services are able to do this at your request - they will put one of their own hosts into the DNS request and redirect the client to a new URL on your behalf.

Gateway servers or CDNs (such as Cloudflare) are also able to redirect clients with 3xx HTTP responses that you can configure from their dashboards.

Otherwise, you'll want to configure your own server to do so. Point the DNS to that server's IP and configure Apache/Nginx/IIS to respond with a 3xx redirect code. As an example, here is an article on Apache 3xx redirects.

10% popularity Vote Up Vote Down


 

@Gretchen104

If you have cpanel you can do it under domains > redirects

If you don't, add the following to your .htaccess file

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^OLDDOMAIN.com$ [NC]
RewriteRule ^(.*)$ NEWDOMAIN.com [R=301,L]


You may need to tweak it for https if you have an SSL certificate

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme