What does a CNAME, an Alias (Parked Domain), Domain Forwarding and a 301 Redirect have in common?
Each of these methods can redirect a domain name to another place!
The functionality of these four methods is pretty similar, so we will explain these differences in this article.
What is a CNAME?
Also known as Canonical Name, a CNAME Record can forward one subdomain to another. For example, if you want to forward news.domain.com to blog.domain.com, that can be done with a CNAME Record.
This sounds simple but using CNAME has its ups and downs;
Pro: The URL in the browser remains the same; indicating that this is the correct method for setting up a subdomain on a 3rd party service, such as Zendesk.
Con: A CNAME can only point to one domain name, not to an IP address.
Many 3rd party services use CNAME records for domain validation, like Zendesk.
When setting up an account with a 3rd party service, you may be asked to create a subdomain and forward it to the specified URL; all of this can be done using a CNAME record.
Note: A CNAME can NOT be used to point to an IP address or to forward your old domain to your new domain (e.g: olddomain.com to newdomain.com).
CNAMEs must be added to your Active DNS Zone. If you are using our nameservers, please contact our Support Team to add the requested DNS record. This option is not availabe regularly via your hosting dashboard.
Note that using a CNAME also does NOT consume any hosting slots in your account.
What is an Alias (Domain Aliasing)?
Domain Aliasing is much the same as using a CNAME however, it involves forwarding a new domain to your original domain.
For example, setting up newdomain.com as an Alias of olddomain.com will allow you load the content of olddomain.com but the URL in the browser will remain newdomain.com until you click any link on the page.
This process is also known as domain masking, so if you read about domain masking somewhere - you'll know what it is!
Domain Aliasing can also be used if you try to reach a nonexistent webpage on olddomain.com via the Aliased domain (newdomain.com), where it will show you the main page of olddomain.com. In this case, the nonexistent page on newdomain.com will load the olddomain.com home page instead.
Here are a few important notes on Domain Aliasing:
1) An Aliased domain cannot have an SSL Certificate installed!
2) In order for the Alias to work, you must point the Aliased domain (newdomain.com) to the same nameservers (or at least the same A Record) as the original domain (olddomain.com).
3) Aliases CANNOT be used to point to specific IP addresses or to point to a specific page on another domain.
4) An Alias IS NOT the same as a 301 redirect; if you need to redirect a domain to another using a 301 redirect, this is not the correct way to do it.
5) The Aliased domain CAN have a separate mailbox.
6) If you want to set up Multisite WP Installation, the extra domains must be set as Aliases.
7) Note that the Alias does NOT consume a hosting slot in your account.
What is Domain Forwarding?
Domain Forwarding is quite different from a Domain Alias; Domain Forwarding is closer to a 301/302 redirect however, it can only redirect a page or a subdomain.
For example, with newdomain.com being forwarded to domain.com, subdomains will also be redirected straight to their counterpart's webpage. This means that newdomain.com will redirect to domain.com, and newdomain.com/contact-us will redirect to domain.com/contact-us. Similarly, blog.newdomain.com will redirect to blog.domain.com.
Overall, this method grants more options than a Domain Alias.
Here are a few important notes on Domain Forwarding:
1) Using Domain Forwarding, you can set your own custom redirects; newdomain.com/contact-us could forward to domain.com/newpage, if you so choose.
2) Domain Forwarding is also SEO-friendly and highly recommended if you have moved your website to a new domain.
3) If WPX is not your domain registrar, then you must set up Domain Forwarding with your current domain registrar.
4) Some domain registrars offer Domain Forwarding with masking, but not many do so.
5) With Domain Forwarding, it's possible to use a mail service however, this is not possible with WPX Hosting. You will have to hire a 3rd party mail service and contact us to set its DNS records correctly.
6) If we are your domain registrar, keep in mind that not all options are available within the Domains menu on your Hosting Dashboard. If you need something to be set specifically, all you have to do is to contact our Support Team with your request.
7) Note that this option also does NOT consume a hosting slot in your account.
What about 301 .htaccess Redirect?
So, what can be done with a 301 .htaccess Redirect? Well, everything!
There's nothing that a 301 .htaccess Redirect can't cover thanks to the flexibility (and complexity) of .htaccess.
Via the .htaccess file, you can set any viable option for Domain Forwarding - except for domain masking!
Using this method, you can set a specific page to point to an IP address. You can also redirect an entire website to another and even exclude single or multiple pages! The reverse option is available too; you can redirect only 1 or 2 pages to another website if you want to.
In order to set a 301 .htaccess Redirect, the domain must be added in your Websites/SSL menu of your Hosting Dashboard. This is the only option that consumes a hosting slot in your account.
Bear in mind that .htaccess rules are very complex, so if you have a hard time setting the rules correctly, do not hesitate to contact our Support Team and they will help you ASAP!