askvity

How to Map Public IP to Domain Name?

Published in Domain Mapping 3 mins read

To map a public IP address to a domain name, you need to create an A record within your domain's DNS (Domain Name System) settings. This record links your domain name to the IP address of your server or website.

Here's a breakdown of the process:

1. Access Your Domain's DNS Settings

  • Log in to the platform where you registered your domain (e.g., GoDaddy, Namecheap, Google Domains, AWS Route 53).
  • Navigate to the DNS management section for your domain. This section may be labeled "DNS Records," "DNS Zone Editor," or something similar.

2. Create or Edit an A Record

  • If an A record already exists for your domain (e.g., @ or your domain name): Edit the existing record.

  • If no A record exists: Create a new one.

    The settings typically include:

    Field Description Example
    Type Select "A" or "A Record" from the dropdown menu. A
    Name/Host This specifies the subdomain the A record applies to. Use @ or leave it blank for the root domain (e.g., yourdomain.com). Use www for www.yourdomain.com. Use blog for blog.yourdomain.com. @, www, blog
    Value/Points To Enter the public IP address you want to map to the domain. This is the IP address of your server. 203.0.113.45
    TTL Time To Live. This specifies how long DNS servers should cache the record. A common value is 3600 seconds (1 hour). 3600 or 1 Hour

3. Save Your Changes

  • Save the new A record or the changes you made to the existing one.

4. Propagation Time

  • It can take up to 24-48 hours for DNS changes to propagate across the internet. During this time, some users might still be directed to the old IP address. You can use online tools like DNS Propagation Checker to monitor the progress.

Example Scenario

Let's say you have a domain name example.com and a server with the public IP address 192.0.2.1. To map the domain to the IP, you'd create an A record like this:

  • Type: A
  • Name: @ (or leave blank, depending on your DNS provider)
  • Value: 192.0.2.1
  • TTL: 3600

This means that when someone types example.com into their web browser, the DNS system will resolve it to the IP address 192.0.2.1, and their browser will connect to your server.

You could also create another A record for www.example.com to point to the same IP address if you want both the root domain and the www subdomain to resolve to your server.

Related Articles