This article is aimed towards people wanting to use a subdomain for their VPS hostname.
What is an A Record?
An A Record, or Address Record, is a type of DNS (Domain Name System) record that maps a domain name to its corresponding IPv4 address. It acts like a phonebook, allowing your domain name to be translated into an IP address that browsers can use to locate and display your website. For example, when you type a website URL into your browser, the A Record helps direct your request to the right server hosting that website.
Key Points:
-
Function: Maps domain names to IPv4 addresses.
-
Usage: Essential for routing traffic to the correct web servers.
-
Example: An A Record for
example.com
might point to192.0.2.1
.
Having accurate A Records is crucial for ensuring that your website is accessible and properly directed to the right server. They are a fundamental part of domain name resolution and internet navigation.
How to add an A record on cPanel
- Login to your cPanel account and select Zone Editor
- Select "+ A Record"
- Once selected you will be asked for your details. In Name type in the subdomain you wish to use (sub.example.com). In the address bar enter your VPS' IPv4 address.