How to redirect a url for a domain
What is a 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 pointed to BasicDNS
(a legacy option) or FreeDNS
If everything is configured properly, it takes about 30 minutes to start working.
NOTE: 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) and vice versa (from https to http). This type
of redirect can be set up either via the .htaccess file or Namecheap SSL plugin in cPanel on condition 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.
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:
: TLD (Top Level Domain)
stands for your domain extension (.COM, .NET, etc.)
There are two ways to proceed with configuring the redirect:
How To Redirect a URL in 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 Save All Changes button:
3. Go to the Advanced DNS
tab to check whether there any conflicting records
, 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.
How To Redirect a URL in Advanced DNS TabNOTE: 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, * for a wildcard record
) 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?
3. Make sure there are no conflicting records ( A
, URL Redirect records with different values but set for the same host) for your domain. If there are any, remove them
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 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.
If you have any questions, feel free to contact our Support Team