What Are Domains?

Domains create your address on the internet. When you own a domain, you can tell people to go to the URL mysite.com and they will see whatever content you’ve associated with that domain. Every domain name is matched to an IP address and follows the Domain Name System (DNS).

Without a domain, every website would only be identified by the IP address. Imagine that instead of typing liquidweb.com into your web browser, you had to remember 67.43.15.214, Liquid Web’s IP address. Now imagine remembering strings of numbers for every website you ever want to visit! Continue reading “What Are Domains?”

Adding a Domain Alias in Cloud Sites

A domain alias is an alternate name for a website. A common use for domain aliases is so mysite.com and mysite.net show the same information. It’s easy to set up domain aliases in Cloud Sites.

When setting up domain aliases in Cloud Sites, remember the alias you create will show the same content as the website where you set up the alias.

  1. Log into the Cloud Sites control panel.
  2. Continue reading “Adding a Domain Alias in Cloud Sites”

What is a FQDN?

What is a Fully Qualified Domain Name (FQDN)?

When working with domains and DNS management understanding what a FQDN is can be very helpful. This article will help explain the concept of a FQDN and a domains different components.

The Parts of a Domain

A domain is made up of a two essential parts, the Top-Level Domain (TLD) and the main Domain Name which is what you register. The other component of domain names are the subdomains. Continue reading “What is a FQDN?”

Enabling DomainKeys Identified Mail (DKIM)

DomainKeys Identified Mail (DKIM) is a way to attach an encrypted digital signature to emails sent by your domain/server. Similar to adding an SPF record to your server, DKIM help to prevent email spoofing.

Email spoofing is when spammers send email that looks like it’s coming from your email address. Spammers spoof your address to make it more likely that recipients will open spam emails, less likely that messages will be marked as spam, and harder to find the true spam source. If your address is spoofed, your server could get flagged as a spam server and you can have trouble sending legitimate mail, even if you aren’t doing anything wrong. This is commonly known as having a bad mail reputation. Continue reading “Enabling DomainKeys Identified Mail (DKIM)”

Where Is My DNS Hosted?

From time to time, you’ll have to make changes to your DNS records. For example, if you change IP addresses, your DNS A records will change. You’ll also change DNS if you want to add SPF records to help email authentication. For these changes to work properly, it’s vital to know where DNS is hosted. Continue reading “Where Is My DNS Hosted?”

How to Configure Your DNS for CloudFlare

Getting Started With CloudFlare™

Pre-Flight Check

  • This article assumes that you have already set up CloudFlare and added your domain.
  • We’ll be adding DNS records in Liquid Web’s Manage dashboard. If your site isn’t using Liquid Web’s nameservers, you’ll need to make changes at your registrar or DNS provider.
  • We’ll be using cPanel to set up an .htaccess redirect. If you don’t have access to cPanel, you will need to edit your .htaccess file directly; if you’re using a web server other than Apache (such as Nginx or IIS), you’ll need to set up the redirect manually. You can find tips for doing so in the bonus content section of this article.
Note: If your site’s DNS records are managed by CloudFlare or any other external source, our Heroic Support® team can provide the records you will need to add there to configure CloudFlare, but we will not be able to access your DNS records themselves.

Step #1: Get Your CloudFlare DNS Settings

  • Once your site has been added to CloudFlare via Manage, select Domains from the left menu, click on the CloudFlare tab and click the [+] button next to your domain name to expand the CloudFlare dashboard.
  • Now click on the DNS Settings link near the bottom-right corner to view your settings.

    View DNS Settings in the CloudFlare dashboard

  • The popup window will show you the specific changes you’ll need to make for your site:

    CloudFlare DNS settings popup

    Specifically, you’ll need to:

    • Add an .htaccess redirect to ensure all traffic to your site uses the “www” subdomain.
    • Add a CNAME record for the subdomain “cf-landing.yourdomainname.com”.
    • Change your CNAME record for the “www” subdomain to point to “www.yourdomain.com.cdn.cloudflare.net”.

Step #2: Redirect Traffic to Your ‘www’ Subdomain

If you have access to cPanel, setting up the redirect is a simple process using the method detailed below. If you don’t have access to cPanel, though, you’ll need to set up the redirect manually. You can find tips for doing so in the bonus content section of this article.

  • Log into your site’s cPanel and click on the Redirects icon.

    cPanel redirect

  • You’ll set up the redirect on this page:
    • Set the Type of redirect to “Permanent (301)”.
    • Select your domain name from the http:// dropdown menu.
    • Leave the / field blank.
    • In the Redirects to field, enter the full URL to which you want to direct traffic. As shown below, it must include both the protocol and “www” subdomain. In this case, we want to redirect traffic for “http://example.com” to “http://www.example.com”, so we’ve put “example.com” in the http:// field and “http://www.example.com” in the Redirects to field.

      13cpanelredirect2

  • Once done, click the Add button at the bottom to put the redirect in place and move on to the next step.

Step #3: Add the CloudFlare Landing Page Record

  • In your Manage dashboard, select Domains from the left menu, then click on the DNS tab to see a list of your domains.
  • Now click the [+] to the left of your domain name to display all of its DNS records.

    Manage dashboard domain DNS

  • Click the Add New Record button in the bottom right to add the new record.

    Add DNS record in Manage

  • We want to add a CNAME record for the CloudFlare landing subdomain, so enter “cf-landing” into the NAME field, select “CNAME” for the TYPE field, and set the TTL field to a reasonable value. TTL, or Time To Live, tells DNS servers how frequently to look for changes to the record. The value is listed in seconds, 3600 (one hour) is typically sufficient. Once done, click the green checkmark button to add the record.

    Add a CNAME DNS record for CloudFlare

  • Review the record details in the popup window to make sure they match the values provided by CloudFlare, and click the Confirm button to add the record.

    Confirm the addition of a CloudFlare DNS record

Step #4: Change the Data Field Value for Your ‘www’ Subdomain

  • Locate the entry for your “www” subdomain and click the Edit button to change its value.

    Edit WWW record

  • In the DATA field, change the current value from your domain name to the value provided by CloudFlare. In this case, we’re replacing “example.com” with “www.example.com.cdn.cloudflare.net”. Because this is an existing record, DNS will abide by the record’s current TTL value; lowering it at this point likely will not speed up propagation, but you may want to check that it has a reasonable value.

    Change the value of your WWW record for CloudFlare

    Once you’ve entered the correct value, click the green checkmark button.

  • Finally, review the values presented on the popup window, and then click the Confirm button to add the record.

    Confirm www CNAME change

  • Once CloudFlare sees the DNS changes you’ve made, web traffic to your site will be routed through its servers. Note that it can take up to 24-48 hours for the DNS changes you made to fully propagate across the Internet, but in many cases you will see the changes take effect much more quickly.

Next Step: Configure Visitor Logging

Because CloudFlare acts as a proxy, sitting between your website and the rest of the Internet, your server will, by default, log all visits to your site as having originated from CloudFlare. Fortunately it is a simple matter to configure your web server so that site visitors’ actual IP addresses will be logged. Proceed to Part Three to get started.
 

Bonus: Domain Redirects for Sites Without cPanel

If you don’t have access to cPanel or are using a web server other than Apache, you’ll need to set up the “www” redirect manually. These instructions cover the general steps for popular web servers:

Apache

Apache redirects are accomplished via .htaccess files. The one you’ll need to edit will be located in your web site’s root directory, but you may need to check a box in your FTP client to show hidden files in order to see it. If you don’t already have a file named “.htaccess” in your site’s main directory, you’ll need to create one.

To redirect your non-www domain to www, simply add these lines at the beginning of your .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301]

IIS

The non-www to www redirect can be made in IIS by adding the following redirect to the site’s web.config file:

<rule name="WWW Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" negate="true" pattern="^www.(.+)$" />
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>

Nginx

Nginx redirects may be configured in the site’s virtual host (.vhost) file or main configuration file, depending on the server version and operating system. Since Nginx is not supported by Liquid Web, we’re assuming that you already know how to edit the virtual host configuration.

To redirect your non-www domain to www, you’ll need to ensure that the primary server is configured to use only the “www” subdomain for its server name.

First, back up the configuration file and then locate the server block for your domain. If both the www and non-www versions of your domain name are listed in the same server block, remove the non-www reference to your site from that server name line. Then create a separate server block for the main, non-www, domain, similar to this one:

server {
listen 80;
server_name yourdomainname.com;
return 301 http://www.yourdomainname.com$request_uri;
}

This will direct all traffic directed at your site’s main domain to the www version of your domain name. Once you’ve finished, restart nginx for the change to take effect.