How to redirect a url for a domain

URL redirect (URL forwarding) allows you to forward your domain visitors to any URL of your choice (to a new domain or a different website).

You can set 301 (permanent), 302 (unmasked), and masked (URL frame) redirects for the domain names pointed to BasicDNS, PremiumDNS, BackupDNS (a legacy option) or FreeDNS.

If everything is configured properly, it takes about 30 minutes to start working.



Read more about different types of redirects.

In case you need to connect your domain to some website-building service, please check 3rd Party Services Setup in our KnowledgeBase.

If you have a hosting plan, you can simply point the domain to your hosting nameservers.

To set the redirect for your domain, first, log in to your Namecheap account and click on Manage next to your domain:



NOTE: TLD (Top Level Domain) stands for your domain extension (.COM, .NET, etc.)

There are two ways to proceed with configuring the redirect:

Using the Domain tab (used for a quick setup of URL redirect only)
Using the Advanced DNS tab (here you may add some other host records as well)

Using the Domain tab

1. After you click on the Manage button, locate the Redirect Domain section and click on Add Redirect:



2. Type your domain in the Source URL field (e.g. yourdomain.tld / domain.com / newdomain.info) and the link to which you need to forward your domain in the Destination URL field. If you want both yourdomain.tld and www.yourdomain.tld to be redirected, add the record for www accordingly.

Save the changes using green checkmarks on the right or Save All Changes button:



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

3.  Go to the Advanced DNS tab to check whether there any conflicting records (A, CNAME, URL redirect records with different values but set for the same host). Such records must be removed for the domain to work properly:



NOTE: Your root domain (domain.tld) is marked with @ symbol in Host field here.

That's it! The redirect should be working within 30 minutes.


Using the Advanced DNS tab

NOTE: For all newly-registered domains there are two default records present that should be removed once your custom records are added (the CNAME and URL redirect you see on the screenshot below).

1. After you click on the Manage button, go to Advanced DNS tab >> Host records section. Click on Add New Record button (not able to edit Host Records?):




2. Select URL Redirect Record from the drop-down menu for Type, put the host to be forwarded to the Host line (@ for your root domain, i.e., domain.com, www for www.domain.com) and enter the destination URL into the Value line. Save the changes:




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

3. Make sure there are no conflicting records ( A, CNAME, URL Redirect records with different values but set for the same host) for your domain. If there are any, remove them as follows:



As a rule, it takes up to 30 minutes for changes to be accepted globally.

NOTE 1: There is an additional A record in the domain zone file once the URL redirect is set for your domain. This A record is not visible in the Advanced DNS section. It simply points your domain name to our internal forwarding server and will be removed once the URL redirect record is deleted.

NOTE 2:  It is not possible to set up a URL redirect in the account for the TCP port forwarding from http://www.domain.tld (uses port 80) to https://www.domain.tld (working via port 443). This type of redirect can be set up either via the .htaccess file or Namecheap SSL plugin in cPanel on if an SSL certificate is installed..

However, you can redirect from an http:// URL on your domain to a separate website with https:// (e.g. http://www.domain.tld to https://www.anotherdomain.tld) as this type of redirect is simple domain forwarding.



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