Everything You Ever Wanted to Know About WordPress Domain Mapping
Domain mapping is a process that you’ll need if you have URLs parked elsewhere that you want to link to your site or redirect completely. Mapping the domain can seem tricky at first, but following the instructions will get you there.
Here are a few reasons to map your domain:
- You have an existing site and want to transfer the CMS to WordPress but keep your URL. This could be purely because you’ve heard about the great things at WordPress and want to try it for yourself. If you’ve built up the reputation and links to a URL, you won’t want to start again completely. So mapping it to a new CMS could be the perfect option.
- You want to point multiple domains to a primary hosting account. For instance, if you have purchased multiple domains to match various search queries or misspellings, your customer will always end up at www.yourdomain.com – your primary domain – and see the content that you have planned for them to see first.
- You want to point your URL to a sub-level page of your site. If you want your blog to be the first thing visitors see when they land on your site, you can set the domain to your blog without having “blog” in the URL, for example. This also works if your blog is hosted elsewhere and you want to link two domains together.
If this is what you’re trying to achieve and you’re working with WordPress or want to transfer to WordPress, then this article is for you.
Once you’ve set up domain mapping, your customers will be redirected to whatever page and URL you prefer without seeing any of the technical side.
How To Map A Domain In WordPress
For initially setting up a domain, the process for mapping differs between WordPress.com and WordPress.org. If it’s the former you’re interested in, your site will be hosted for free by WordPress and you’re probably simply looking at buying your URL to get rid of the wordpress.com part of your URL. By doing so, you create a more professional-looking, trusted, custom site. And of course, it’s your very own URL.
It’s really cheap to buy the URL through WordPress and once you’ve done so, WordPress automatically redirects any old links that point to www.yourdomain.wordpress.com. You simply need to go to the My Domains page and select which domain is to be your primary domain.
If you’ve opted for WordPress.org as a CMS, you’ll have bought hosting elsewhere. The hosting package will have included a URL and usually the package includes mapping the domain to WordPress, which means you don’t need to worry about doing this yourself.
If you already have a site elsewhere and want to switch to WordPress (and why wouldn’t you, I say!), you’ll need to do some work yourself but it’s still fairly simple. Again, it’s cheap to do per year, but you’ll also have to renew your domain with the original supplier and pay them the annual fee. This is easy to forget once you’ve moved to WordPress, so mark the renewal date in your diary to avoid downtime for your website.
Firstly, you’ll need to tell your domain registrar who originally supplied your URL that you’re planning on moving. Make it clear that you want to transfer but leave it registered with them, since WordPress does not accept incoming domain transfers. Your registrar should be able to walk you through what you need to do.
For each registrar, the domain’s name servers need to be amended to the following through the registrar’s website:
Then come back to WordPress and head to the Domains page on your dashboard. Simply enter the domain name in the box, press go and pay your fee.
It’ll take around 72 hours for the process to complete, and once it’s done, you’ll need to go to the My Domains area of your dashboard and click on the domain to be your primary domain.
Bear in mind when you map your domain that any emails registered with the original registrar will need to be amended too, otherwise it will stop working. This is because you’re changing name servers, so you need to find out the Custom DNS information for this email from your registrar first. Then, click “Edit DNS” and enter these details.
Just a note on the redirects too: if you’ve registered your old URL elsewhere and are keeping track of its traffic, for instance through Twitter, the link will redirect but it won’t count the referral in your analytics. You’ll need to manually update this wherever you’ve linked it.
Multisites And Subdomains
As well as pointing existing domains to other websites, you can create multi-sites and sub domains. The WordPress instructions are fairly simple and you’ll just need to do a little investigating on the other provider’s side to set up the process.
Multisites are useful for making sure misspellings of your website direct to your content or for creating multiple domains for strategic search purposes. However your readers and customers will never know, since domain mapping hides this. To add domains to your parent site, you’ll need to add your new domain to your User Portal, then navigate to Your Sites in the dashboard. Click “Add New” and fill out the required information, including the new subdomain’s address.
A subdomain is a second website that has its own content but is part of a larger website. Mapping a sub domain differs from mapping an existing domain because the latter redirects to the primary domain. Therefore, the existing domain either has no or out-of-date content and the reader won’t see this, while a sub domain contains stand alone content that just needs to be linked to the larger website.
A good example of this is attaching a blog to a larger website. You could have an existing domain and want to set up a WordPress blog, such as adding the existing www.yourblog.wordpress.com to www.yourdomain.com to become www.blog.yourdomain.com. The benefit of this is that you can still blog through WordPress and take advantage of all its features.
So, how do you do this? The instructions for the WordPress side are below and your registrar will be able to help for their side too.
- You need to add a CNAME record through the registrar where you originally bought the domain. Wait for confirmation from them that it has been added and verified.
- Back at WordPress, input your sub domain into the Domains section of the dashboard. You’ll need to pay a fee at this point.
- Head to My Domains and select your custom domain as the primary domain.
You don’t need to add any kind of CNAME record if your domain is already registered with WordPress or mapped to a WordPress blog.
If you register a subdomain through WordPress and then want it to point elsewhere, you’ll have to go through a similar process. You’ll need to add a new DNS record in the Edit DNS through the My Domains area. Choose the CNAME dropdown and add the desired subdomain in the first box and what’s supposed to show up as that subdomain in the second box. You’ll then go to the place where the subdomain will be mapped to and follow their instructions to complete the map.
How about if you have a WordPress.com domain that you’d like to make a subdomain of a self-hosted WordPress.org website? This one is simple. You’ll need to find the IP address of your external host and add this to the Edit DNS section of My Domains in your dashboard. In the Add New DNS section, choose A from the dropdown menu and add the IP address to the second box. In the first, add the desired subdomain.
With The Help Of Plugins
The plugin to use for mapping domains is WordPress MU Domain Mapping. It works with WordPress MU sites or WordPress 3.0 or higher networks. It takes a little configuration to get it right, but it’s the best to assist you with your mapping.
Usually plugins are as the name suggests: plug in and go. But with the WordPress MU Domain Mapping plugin, you have to manually install it. You need to put the domain_mapping.php file into the mu-plugins folder, and the sunrise.php file into the wp-content folder. If you don’t have the mu-plugins folder already on your system, simply create it underneath the wp-content folder.
You then need to add some code to get WordPress to activate the sunrise.php file. Open the wp-config.php file and edit it by adding the line:
1 define( ‘SUNRISE’, ‘on’ );
Next, go to the Domain Mapping area while logged in as the super user. Add your server’s IP address or a CNAME that points to your server to configure the domain mapping. It’s best for non-advanced users to leave the “Domain Options” as they are.
The rest of the instructions are similar to what you’d do to map one existing domain, as discussed above: edit the DNS settings to point to your server IP or CNAME and choosing which domain name to be the primary under My Domains.
It does take a little bit of research and work to get domain mapping set up and working correctly, but if you carefully read the instructions and practice a little bit of patience, it’s worth doing. This is particularly so if you otherwise feel trapped into staying with your current CMS or want to give your readers access to more content.
Make sure all parties involved with your domains provides the assistance you need, as it isn’t difficult on their side. You might just need them to give you file names or locations and you can be on your way. Also, complete one step at a time so that if there are any mistakes, you can just reverse one step, find out where the error lies, and fix it.
Have you ever completed the domain mapping process? If so, I’d love to hear about your experience!
Article thumbnail image by Blan-k / shutterstock.com