How to Connect a Domain with your VPS - The Easy Way

Discussion in 'Tutorials and Guides' started by Gaiacom_LC, Jul 29, 2014.

  1. Gaiacom_LC

    Gaiacom_LC New Member Verified Provider

    Jan 7, 2014
    When setting up a new VPS, one of the most common tasks is to link a domain name. The process is roughly the same as with a shared hosting account, although a VPS may or may not come with ready-made nameservers available. 

    Often, you will need to configure your own nameservers on a VPS. To avoid this, and get started as quickly as possible, we will use an easy method to point a domain to a VPS (or other server). 


    • Domain name registered (.com, .net, etc.)

    • Using default nameservers and DNS system of the registrar (default settings).

    • IP address of your VPS or server.

    Here are the instructions:

    - Log in to your domain registrar*(where your domain was purchased), for example Namecheap or GoDaddy.

    - Locate the section for adding or modifying DNS Zones. Look for "Records" or "Zones."


    - Choose your domain (if not already selected), and proceed to Add a new DNS record.

    - Add a record of type "A" (Address Record). Fill in the fields like this:


    Subdomain: @ 

    Record/Host: (Your server's IP address)

    - Additionally, add a CNAME record for subdomain "www" pointing to host "" (your domain) to enable use of

    Save the new settings, and exit. That's it! 

    The crucial step is pointing "@", which stands for your root domain '', to the IP address of your VPS. The registrar's nameservers will now host this record, and all traffic to your domain will be automatically routed to the server IP address. It may take up to 12-24 hours for the new DNS changes to propagate around the Internet, so you may not see the change take effect immediately.

    Note that if your registrar's format does not allow "@", you can usually leave the 'subdomain' field empty, because you are entering a record for the root domain.

    Archived in our VPS Hosting Blog.
    Last edited by a moderator: Jul 29, 2014
  2. MannDude

    MannDude Just a dude vpsBoard Founder Moderator

    Mar 8, 2013
    Nice, simple tutorial. Thanks for sharing.
  3. Schultz

    Schultz New Member

    Jun 3, 2014
    Great tutorial :)
  4. MannDude

    MannDude Just a dude vpsBoard Founder Moderator

    Mar 8, 2013
    Cloudflare and Rage4 are also quite simple and fast to use to get setup. DNS is just one of those things I don't really care to host myself anymore. Used to run a small DNS cluster but I'd rather let professionals handle it now. :)
  5. Gaiacom_LC

    Gaiacom_LC New Member Verified Provider

    Jan 7, 2014
    Agreed. Cloudflare would definitely be one of my first recommendations for outside DNS.
  6. Derpec

    Derpec New Member

    Aug 4, 2014
    Very easy and detailed tutorial ! Thanks for sharing. 
  7. pravint

    pravint New Member

    Jun 23, 2014
    Very nice and easy tutorial. 
  8. Abdussamad

    Abdussamad New Member

    May 17, 2013
    www should also be an A record pointing to your IP. Saves a DNS lookup.
    Last edited by a moderator: Aug 15, 2014
    switsys likes this.
  9. Gaiacom_LC

    Gaiacom_LC New Member Verified Provider

    Jan 7, 2014
    Good point, though I think there are also some benefits to canonicalizing the www record. Either one works. :)
    Last edited by a moderator: Aug 15, 2014
  10. NodeWest-Dan

    NodeWest-Dan New Member

    Jul 16, 2013
    I use rackspace cloud DNS for personal projects.
  11. IntegralHost

    IntegralHost New Member Verified Provider

    Nov 15, 2014
    Note that, if you are using registrar name servers. You should create all your DNS records such as ( A, MX, NS, CNAME... ) at registrar end. I noticed many of them always missing to create MX record and facing mail issues.
  12. EnveraHost

    EnveraHost New Member

    Dec 6, 2014
    Great detailed tutorial.
  13. SentinelTower

    SentinelTower New Member

    Nov 25, 2014
    Nice tutorial which should help most beginners.

    Maybe you should add how to add MX records as some users may want their email delivered to their VPS as well.
  14. badsha

    badsha New Member

    Mar 12, 2015
    Very nice and Helpful tutorial. :)