When mapping domains to sites, there are multiple ways of going about this. For sites hosted on ReclaimPress, it is recommended to use CNAME records whenever possible. We have another article with a section discussing A records and CNAME records in more detail.
However, you can't always point domains using CNAMEs. While subdomains can always be pointed using CNAMEs, root domains (also known as a second-level domains) usually need to be pointed using A records. This article will show you how to do both.
In the instructions below, we will be making changes to your domain's DNS records. For Reclaim's Shared Hosting clients, you can go into cPanel and locate the Zone Editor tool. (For those using other tools or domain providers, you will want to refer to your DNS provider's documentation.)
Remove any existing DNS records for your Domain
You'll want to start by checking if an A or CNAME records that already exist for the domain name you want to map. In this example below using the Zone Editor in cPanel, there is one already mapped to an IP, so we can delete it before adding any new records.
Mapping Domains using CNAMEs
Start by logging into ReclaimPress to locate the CNAME record for your site. This is located in the page for your site's environment, near the top.
Once you've found it, you can copy it to your clipboard. After that, you'll return to the Zone Editor, search for the domain whose DNS records you want to change, and start making a new CNAME record.
The option to create a new record is available in the top right of the Zone Editor. Select Add "CNAME" Record and set the record to whatever your environment's CNAME is. In this example, we're pointing samplepress.pilotirwin.com to samplesite.ca.reclaim.press.
After that, you'll bind the domain in ReclaimPress to make sure that everything is set up. Because this step is the same as after you bind an A record, it will be covered in the Binding the Domain in ReclaimPress section of the guide.
Mapping Domains using A Records
To bind an A record, you'll first need to find out what datacenter your site is deployed to. You can do this by clicking on Datacenter info from the main ReclaimPress Dashboard, or when viewing a particular site's Overview page.
In the example above, the site is deployed to the US-East region. Once you know the region your site is hosted in, you can consult the table below to find the IP addresses for that particular region.
Once you've made note of the two IP addresses for your site's region, we can make the A records on the DNS side of things.
Next, you'll want to go to the DNS Zone editor to create a new record. Using the dropdown menu in the top-right corner, select Add "A" Record.
After that, you'll want to enter the domain name for your site in the Name column, and the first IP address for your site's region in the Record column. Then click Save Record.
Next, you'll want to add another A record for the second IP address. When your finished making both records, it should look something like this:
Once you're done mapping your A record, there are a few final steps to take care of. These are the same for both CNAMEs and A records, so they'll be addressed in the next section.
Binding the Domain in ReclaimPress
After you're done binding DNS records in the Zone Editor, you'll need to bind the domain to your site in ReclaimPress. This is essentially telling the site to expect visitors who are using the new domain, while the CNAME or A record directs visitors accordingly.
There are two ways to do this. The first is to go to your site's overview page and locate Edit Domain Name near the top.
This will open a little window where you can enter the domain you've just bound.
After that, you're done.
Alternatively, you can bind your domains in the environment's settings. This is good if you want to bind multiple domains to the same environment.
When mapping a domain to an environment outside of cPanel, you need to remember that SSL certificates are generated by the environment, not by the area where the domain is managed. This means that you'll need to issue and map an SSL certificate to your domain through ReclaimPress. We have a guide available on how to do this here: Installing SSL in ReclaimPress.