How to redirect a URL for a domain?

What is URL redirect?

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 that use our BasicDNS, PremiumDNS or FreeDNS nameservers.

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

NOTE: URL forwarding described in this article cannot be configured for Google Registry TLDs (.app, .boo, .day, .dev, .how, .new, .page, .rsvp, .soy). Such domains must have an SSL certificate installed along with the HTTPS setup for them to load in browsers, which cannot be done on our URL Redirect servers.




NOTE: Redirect with a secure connection (HTTPS) is possible only to a different destination domain (e.g. http://www.domain.tld to https://www.anotherdomain.tld). If you need this type of redirect (HTTP >> HTTPS) or vice versa (HTTPS >> HTTP) within one domain name (http://domain.tld to https://domain.tld) , it should be done via  the .htaccess file or Namecheap SSL plugin in cPanel on the condition an SSL certificate is installed . Please note that https://domain1.com to https://domain2.com will not work as well without having SSL certificates installed on both domains.

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

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 URL 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)

How To Redirect a URL in the Domain Tab

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


NOTE: Click Add Wildcard redirect to create a wildcard record to match requests for non-existent subdomains.

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 the 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 are 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 the @ symbol in the Host field here.

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


How To Redirect a URL in the Advanced DNS Tab


1. After you click on the Manage button, go to Advanced DNS tab >> the Host records section. Click on the 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, * for a wildcard record), and enter the destination URL into the Value line:


If needed, change the Redirect Type from Unmasked to Masked or Permanent (301) using the drop-down menu:


3. 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.

4. 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: There is an additional A record in the domain zone file once 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.


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


Updated
Viewed
452028 times

Need help? We're always here for you.

notmyip