Knowledge Base

How to Connect a Domain to a VPS  Print this Article

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).

Requirements:

  • 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:

  1. Log in to your domain registrar (where your domain was purchased), for example Namecheap or GoDaddy. The example below is from Namecheap.
  2. Locate the section for adding or modifying DNS Zones. Look for “Records” or “Zones.”
  3. Screen Shot 2014-07-29 at 2.30.11 PM
  4. Choose your domain (if not already selected), and proceed to Add a new DNS record.
  5. Add a record of type “A” (Address Record). Fill in the fields like this:Screen Shot 2014-07-29 at 2.17.30 PM
  6. Additionally, add a CNAME record for “www”, pointing to “domain.com” (your domain) in order to use www.

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

The crucial step is pointing “@”, which stands for your root domain ‘domain.com’, 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.

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.

Was this answer helpful?

Related

How to Reboot a VPS
To reboot your VPS: Log in to the VPS Panel at: https://panel.solvps.com/ Select your VPS...
How to Disable cpHulk (cPanel Firewall) from SSH or WHM
WHM/cPanel comes with a built-in firewall called cpHulk, with advanced protection for...
How to Install .NET 4.5 Framework
You may find that software you are installing requires Microsoft .NET Framework 4.5 or 4.6. If...
VPS Offline and Not Responding (How to Diagnose)
If you cannot connect to your VPS, use these tips to check the status of your VPS. Please contact...
How to Connect to a VPS with SSH (Windows,OS X,Linux)
Connecting with SSH (Secure Shell)There are 2 primary ways to connec to a Linux VPS. The first is...