Overview
The DNN CMS allows you to add as many domain names to your website as you wish. You can allow all domain names to respond the same way, or set one as primary. You have a lot of power beyond specifying which one is the primary domain name. You can also decide whether or not you wish to redirect requests using a HTTP 301 redirect for better search engine optimization ("SEO") or have them respond canonically.
In this article, we're going to show you how to have multiple domain names, but only respond to one of them.
Requirements
The following prerequisites will be necessary to accomplish the goals of this article:
- Have a basic understanding of how SEO works
- Have superuser access to your website
- Be familiar with the CMS control panel
- Be web-savvy
Getting Started
It's very important that your desired domain names are all already purchased and the DNS for each is already assigned to your website so requests to that domain name actually end up on your website. Updating DNS is outside of the scope of this article.
Add Multiple Domain Names but Respond to Only One
For the purposes of this support article, we're going to assume that your domain name is Example.com and you want to also support requests to www.Example.com. That's right... In the world of the internet, your website won't automatically respond to both. It needs to know you want that to happen.
Example Domains to Add
- example.com
- www.example.com
First, log in as a superuser. When you do, you will see the persona bar and Site Settings in the Settings menu, as seen below.
Once you go into Site Settings, choose Site Behavior and then Site Aliases. This is where you control if and how the CMS responds to domain names. An expected domain name must be listed here in most use cases.
Choose Add Alias to add your new domain name. You'll do this for each domain name you wish to add.
The theme and browser settings can be ignored in most cases.
If you wish for the new domain name to be the primary domain name, be sure to click the Set Primary button when you save this new domain name. When you save this setting, you may be redirected to the new domain.
Repeat this step for each domain name you wish to have the website respond to.
Redirect versus Canonical
Now that you have your domain names added, you want to decide how to respond to them all.
By default, the domain names will be responded to using canonical logic. This means that any domain name listed here will accept the request. The domain and website will respond as if it's the only domain name.
In this case, we're assuming that you only want to respond to the non-www domain name.
You can see above that our domain names have been added, but we haven't yet done anything else. In this example, we want to only accept requests to example.com and not from the other two domain names.
In order to do this, choose the Redirect option for the mapping mode. Once you save this change, all requests will use a search engine-friendly redirect known as an HTTP 301 redirect to rewrite any request to the other domain names to this one.
For example... This request:
https:///www.example.com/Section/Page?key=value
Would become:
https:///example.com/Section/Page?key=value
And the search engine will know that the latter URL is the correct one. If we didn't do that, then you might get penalized by the various search engine algorithms for having duplicate content. Or what's more, no one will be able to consistently identify your brand.
That's all there is to it... Have fun!
Need More Help?
Do you need more assistance with this article? Please review your support options.