How do I set up a URL redirect for a domain?

You can set up a URL redirect to forward your domain (e.g., http://yourdomain.tld) or subdomain (e.g., http://any.yourdomain.tld) to any destination page of your choice. Usually, when you set up a URL redirect for a domain, it takes 30 minutes to take effect. Visit this page to check all available redirect types.

It is possible to set up a URL redirect from Namecheap's side for domains that are using our BasicDNS, BackupDNS, PremiumDNS or FreeDNS.

To set up a URL redirect, you can choose one of these options:

The main difference between those two options is that the Domain tab is used for a quick setup of URL redirect only, while in the Advanced DNS tab other host records can be created as well.


Using the Domain tab
 
(1) Make sure that you are logged into your Namecheap account (The "Sign In" option is available in the top hat of the page):



(2) Select Domain List from the left side menu and (3) click the Manage button next to your domain:



(4) Click on the Add Redirect button in the Redirect domain section:



(5) Put your domain into Source URL (e.g., yourdomain.tld) and the link you need to forward your domain to into the Destination URL field:



(6) Click on the Save All Changes button in order to save the changes:



Go through the same steps to redirect any sub-domain (e.g., www, blog, etc.) to any URL, the Source URL in such cases would be your sub-domain, for example www.

(7) Please check in the Advanced DNS tab if there are any URL Redirect (Unmasked/Masked/Permanent), A or CNAME records set for the same Host. Such records can conflict with each other, thus, they are to be removed.

Here is an example of such conflicting records:



Using the Advanced DNS tab


(1) Sign into your Namecheap account (The "Sign In" option is available in the top hat of the page):



(2) Select Domain List from the left side menu and (3) click the Manage button next to your domain:



(4) Navigate to the Advanced DNS tab and (5) click the Add New Record button (not able to edit Host Records?) in the Host Records section:



(6) Select URL Redirect Record from the drop-down menu for Type, put your desired host to be forwarded to the Host line and enter the URL you would like to redirect to into the Value line:



More details on hosts you can use can be found in the "How do I create a subdomain for my domain?" article.

Let's say you need to forward your www.yourdomain.tld to https://someurl.tld. In this case the host to be entered in the Host field would be "www":



(7) Click on the Save All Changes button each time you need to save the record:



(8) Please also check if there are any URL Redirect (Unmasked/Masked/Permanent), A or CNAME records set for the same Host. Such records can conflict with each other, thus, they are to be removed.

Here is an example of such conflicting records:





Redirect a domain/subdomain to a specific page on a website and pass values via query strings (for domains pointed to our BasicDNS only)

You can also use URL Redirect to forward users to a specific page at the destination URL and pass values via query strings to the destination. It is important to note that the value in the Destination URL affects where and how the URL is redirected.

Our URL redirect forwarding does not check or count if the slash is located at the end of the destination URL only. The system will count any slash in the destination URL and all parameters of your domain name will be redirected as it is described in the last examples.

Host name

Destination URL

Redirect type
www1 http://destination.com Unmasked / Masked or Permanent (301)
www2 http://destination.com/ Unmasked / Masked or Permanent (301)
www3 http://destination.com?1=2 Unmasked / Masked or Permanent (301)
www4 http://destination.com/page?c=d Unmasked / Masked or Permanent (301)


In the first case, www1.yourdomain.com will not pass values to the destination URL, so www1.yourdomain.tld/xyz.html will redirect users to http://destination.com only. Thus, all values that you put in the original URL under your domain name will be left out.

In the second case, www2.yourdomain.tld/xyz.html will redirect users to http://destination.com/xyz.html (pay attention to the symbol "/" in the configuration). All values that are put into the original URL under the domain name will be included in the destination address and applied in the results.

In the third case, www3 combines query string values (if any) and passes them to the destination URL. For example, www3.yourdomain.tld/something?a=b will redirect users to http://destination.com/something?a=b&1=2. The parameters that are input into the original URL under the domain are combined with parameters preconfigured in the Value field.

In the fourth case, www4.yourdomain.tld/example?a=b will redirect users to http://destination.com/example/page?a=b&c=d. In other words, if http://destination.com/page?c=d is the destination URL, and "c=d" are the parameters preconfigured at the page http://destination.com/page, then when you try to access http://www4.yourdomain.com/example?a=b, the values from the original and the destination URLs get combined, and you are redirected to http://destination.com/example/page?a=b&c=d.

That's it!

If you have any questions, feel free to contact our Support Team.

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close