A Records vs. CNAME Records
When mapping domains to sites, there are multiple ways of going about this. You can map your domain to a CNAME record, or you can map your domain to an A record.
We have another article with a section discussing A records and CNAME records in more detail. However, for the time being, it's enough to say that pointing a domain's A record means pointing it directly to a site's IP address, and pointing the domain's CNAME record means pointing it to another domain the site is presently using.
Pointing domains using CNAMEs is best practice, because it accounts for any potential changes in IP address down the road. If a site is migrated to a new server and the IP address suddenly changes, A records will break, but CNAMEs will still work.
However, you can't always point domains using CNAMEs. While subdomains can always be pointed using CNAMEs, root domains, or top level domains, usually need to be pointed using A records. This article will show you how to do both.
We also have another article, Mapping a Domain to Custom DNS Records, which has a lot of relevance to this guide. If you run into issues pointing your domain, you can check that guide to see if there are any alternative steps to take.
No Need for Unique IP Addresses
ReclaimPress offers multiple ways to bind your domain using both CNAME records and A records. Unlike Reclaim Cloud, Reclaim Press does not require a unique IP address in order to bind a domain to that environment and issue an SSL certificate, which saves $3/month/environment.
Mapping a Domain
Before mapping your domain, there are some steps you'll want to take regardless of whether you plan to use a CNAME or an A record. Specifically, you'll want to check the existing DNS records for your domain and make sure that there are no conflicts between what's already there, and what you're about to add.
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.) You'll want to look for the record for the domain you're planning to point and find any that reference a specific IP address (typically, that's A records and TXT records).
You can delete existing records, as you'll be making new ones later on.
Mapping Domains using CNAMEs
Once you've cleared out any DNS records that include IP addresses, you'll want to go into ReclaimPress and 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 new CNAME records.
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.
You'll want to set a CNAME record both for the main domain, and for its www. version (here this would be samplepress.pilotirwin.com and www.samplepress.pilotirwin.com).
After that, you'll bind the domain in ReclaimPress to make sure that everything is connected up. Because this step is the same as after you bind an A record, it will be covered in the Final Notes After Mapping section of the guide.
Mapping Domains using A Records
To bind an A record, you'll first need to find the IP address for your environment. This is sent to you when you first spin up your site, in an email with the subject line "Public IP(s) Attached to Your LLSMP Node at Virtuozzo".
However, if you lose the email, you can still find your IP address in other ways. We recommend using WhatsMyDNS, where you can search your site's environment subdomain. You'll find your site's environment subdomain by looking for the CNAME record, which can be found near the top of your site's main page.
Once you have the record, you can search it in WhatsMyDNS under "A Record".
The IP address for our sample site is 22.214.171.124, so that's what we'll use to bind our domain. You'll start by creating a new record in the Zone Editor, using the dropdown menu in the top right corner. Select Create "A" Record.
After that, you'll input the IP address where the old one used to be. This example uses the subdomain samplepress.pilotirwin.com; however, A records are best used to map top-level domains -- if we were using samplepress.com, for example.
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.
Final Notes After Mapping
Re-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, because you can enter them over and over rather than editing the primary domain.
Once the domain is bound, you'll need to wait for it to propagate fully. Note that it can take 24-48 hours for domain changes to fully propagate.
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.