Configure Your Domain Name

Regardless of your blogging platform, you need to ensure that the domain name you registered is properly configured. If you’re using a hosted service like WordPress.com, Blogger, or Tumblr, simply follow the instructions provided by your vendor. If you’re self-hosting WordPress, Jekyll, or similar software, pay close attention to the following instructions.

For a self-hosted blog to be associated with a domain name, you’ll need to take two steps: set the DNS (domain name system) servers for the domain, and then add your domain to the appropriate DNS zone.

The first step usually requires you to use the domain registrar’s interface to set the nameservers to those of your hosting company (e.g., “ns1.digitalocean.com,” “ns2.digitalocean.com,” and “ns3.digitalocean.com”).

Next, you’ll need to use the interface provided by your hosting company (such as cPanel, Linode DNS Manager, and so on) to add your domain name or subdomain to its DNS zone. If you can’t find the option, it’s usually located under the Networking menu, but it understandably varies depending on the hosting company. If you declared your domain name during the registration of your hosting account, the association of your domain name with your server IP should’ve already been taken care of for you.

If you aren’t sure how to go about these two tasks, any reputable domain or hosting company will have instructions on how to accomplish them. If you’re truly stuck, feel free to contact the company’s customer support folks; they should definitely be able to help you out with the process.

If you prefer, you can also use a hosting-agnostic DNS management service such as DNS Made Easy, DNSimple, Amazon Route 53, or a more comprehensive offering such as Cloudflare.[37] You can set your domain’s nameservers to those provided by one of these services and then configure which server IP the domain should be pointed to at any time through the interface. These services can simplify DNS management, speed up switching to a different server, and centralize your DNS organization, particularly if you own multiple sites.

One way to verify if your domain has been properly set up is by running the commands whois yoursitename.com and dig yoursitename.com, which should show you the nameserver and the IP your domain points to, respectively. The nameservers should be the ones that you just set. Dig is usually available by default on *nix systems. Windows users can either install a version that runs on Windows or use a web version of the tool (search for “web-based dig” to find one).

Note that DNS propagation can take several hours, so if you want to work with your domain name right away, you can edit your local hosts file to have the domain name point to the right server IP locally. This change enables you to use your domain name instead of the server IP as you configure your self-hosted blog, even before the DNS records have become visible to the world. On *nix systems this is usually located at /etc/hosts. For Windows, consult the Wikipedia page at https://en.wikipedia.org/wiki/Hosts_(file).

In your hosts file, you should include a line that looks like this:

 174.122.8.30 yoursitename.com

Replace the fictitious IP and domain name with your real ones. If you don’t know the IP of your server, you should check the emails your hosting company sent you when you registered with them, because it’s usually located there. Logging in to your hosting account will also typically provide you with this information. If all else fails, just ask your hosting company.

As mentioned earlier, the rest of this chapter shows you how to install and perform a basic configuration of your blog using self-hosted WordPress as the main tool. Tips to guide Blogger users are provided as well. If you opted for Jekyll, Hugo, Ghost, TypePad, Medium, or any other alternative blogging platform, this information will still be useful to you. So consider reading on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset