Hosting & Deployment

How to Change DNS A Records: 7 Proven Easy Steps

0

How to Change DNS A Records is an essential skill for website owners, developers, freelancers, and beginners who manage domains and web hosting. An A record connects a domain or hostname to an IPv4 address, allowing browsers and other services to locate the correct server.

For example, if your website is currently hosted on one server and you move it to another server, you may need to change the A record so your domain points to the new server’s IP address.

Learning How to Change DNS A Records is not difficult, but making an incorrect DNS change can temporarily make your website unavailable. This is why you should understand what an A record does, identify your authoritative DNS provider, record your existing configuration, enter the correct IP address, and verify the result.

In this beginner-friendly guide, you will learn How to Change DNS A Records step by step. We will cover A records, DNS providers, IP addresses, cPanel, Cloudflare, DNS propagation, website migrations, troubleshooting, security, and common mistakes.

How to Change DNS A Records

What Is a DNS A Record?

Before learning How to Change DNS A Records, it is important to understand what an A record actually does.

An A record, or Address record, maps a hostname to an IPv4 address.

For example:

example.com
      ↓
A Record
      ↓
203.0.113.10

When someone enters:

https://example.com

their device needs to determine which server should handle the request.

The DNS system helps translate the domain name into an IP address.

A simplified process looks like this:

Visitor
   ↓
example.com
   ↓
DNS Lookup
   ↓
A Record
   ↓
203.0.113.10
   ↓
Web Server
   ↓
Website

This is why understanding How to Change DNS A Records is particularly useful when moving a website between servers.

Why Would You Change a DNS A Record?

There are several common reasons to learn How to Change DNS A Records.

You may need to change an A record when:

  • Moving a website to a new server
  • Changing hosting providers
  • Moving from shared hosting to a VPS
  • Connecting a domain to a cloud server
  • Changing your server’s public IPv4 address
  • Pointing a subdomain to another server
  • Setting up a staging environment
  • Migrating a website
  • Recovering from an incorrect DNS configuration

For example, suppose your current website uses:

example.com → 198.51.100.10

and your new server uses:

203.0.113.20

You would change the A record from the old IP address to the new one.

This is one of the most common reasons people search for How to Change DNS A Records.

A Record vs CNAME Record

A common beginner mistake is confusing A records and CNAME records.

An A record points a hostname directly to an IPv4 address.

Example:

example.com → 203.0.113.10

A CNAME points one hostname to another hostname.

Example:

www.example.com → example.com
FeatureA RecordCNAME Record
Points toIPv4 addressHostname
Example203.0.113.10server.example.com
Common useWebsite/serverAlias/subdomain
Direct IP addressYesNo

If your hosting provider gives you an IPv4 address, you will usually use an A record.

If the provider gives you a hostname, it may require a CNAME instead.

Understanding this difference is important when following How to Change DNS A Records.

[Internal link: How to Configure CNAME Records]

What Information Do You Need Before Changing an A Record?

Before starting How to Change DNS A Records, collect the following information:

  • Domain name
  • Current A record
  • New IPv4 address
  • DNS provider login
  • Hosting provider information
  • Nameserver information
  • Required TTL
  • Any related DNS records

For example, your hosting provider may give you:

New Server IP:
203.0.113.25

You may then need to configure:

Type: A
Name: @
Value: 203.0.113.25

Your DNS provider may use different labels such as:

Host
Name
Content
Points to
Value
IPv4 address

The exact interface depends on the DNS provider.

Step 1: Find Your DNS Provider

The first step in How to Change DNS A Records is identifying where your DNS records are managed.

Your domain registrar and DNS provider may not be the same company.

For example:

Domain Registrar → Company A
DNS Provider → Cloudflare
Website Hosting → Company B
Email Provider → Company C

In this example, you need to change the A record at Cloudflare.

Log in to the service that manages your DNS.

Look for options such as:

DNS Management
Manage DNS
DNS Records
DNS Zone
Zone Editor

You should see different types of records, including:

A
AAAA
CNAME
MX
TXT
NS

If you cannot find your DNS records, check your domain’s nameservers.

Finding the correct DNS provider is one of the most important steps in How to Change DNS A Records.

Step 2: Find the Existing A Record

Before changing anything, locate your existing A record.

For example:

Type: A
Name: @
Value: 198.51.100.10

You may also have an A record for a subdomain:

Type: A
Name: app
Value: 198.51.100.20

The @ symbol commonly represents the root domain.

Therefore:

@ → example.com

while:

www → www.example.com

and:

app → app.example.com

depending on how your DNS provider displays records.

Before making changes, take a screenshot or write down the current DNS configuration.

This gives you a reference if something goes wrong.

Step 3: Confirm the New Server IP Address

The next step in How to Change DNS A Records is confirming the new IP address.

Your hosting provider should provide the correct IPv4 address.

For example:

New server:
203.0.113.50

Do not guess the IP address.

Do not use the IP address of another server simply because it appears in an online tutorial.

Your domain should point to the actual server hosting your website.

If you are migrating a website, confirm that:

  • Website files are uploaded
  • Database is configured
  • PHP version is compatible
  • Domain is configured on the new server
  • SSL is ready
  • The new website has been tested

Changing DNS before the new server is ready can result in visitors seeing an error page.

This preparation is an important part of How to Change DNS A Records.

Step 4: Edit the A Record

Now you can change the A record.

Open your DNS management panel.

Find the existing record:

Type: A
Name: @
Value: 198.51.100.10

Click Edit.

Replace the old IP address:

198.51.100.10

with the new IP address:

203.0.113.50

Your final record may look like:

Type: A
Name: @
Value: 203.0.113.50
TTL: Auto

Save the changes.

This is the central step in How to Change DNS A Records.

Step 5: Check the www Record

Changing the root-domain A record does not necessarily change how www works.

For example, your DNS might contain:

@      A       203.0.113.50
www    CNAME   example.com

In this case, www.example.com follows the CNAME to example.com, which then resolves to the new A record.

However, your configuration could instead contain:

@      A       198.51.100.10
www    A       198.51.100.10

If you change only the @ record, www.example.com may continue pointing to the old server.

Therefore, always check:

example.com
www.example.com

after following How to Change DNS A Records.

Step 6: Wait for DNS Propagation

DNS changes are not always visible immediately.

After changing an A record, DNS resolvers may continue using cached information based on the record’s TTL.

For example:

Old IP
198.51.100.10
       ↓
DNS Cache
       ↓
New IP
203.0.113.50

Some users may reach the old server while others reach the new server during the transition.

The exact timing depends on DNS caching, TTL values, recursive resolvers, and other factors.

Do not repeatedly change the A record simply because your own computer still reaches the old server.

Waiting for DNS caches to expire is an important part of How to Change DNS A Records.

Step 7: Verify the New A Record

After completing How to Change DNS A Records, verify the public DNS result.

Using dig

On Linux or macOS, use:

dig A example.com

For a shorter result:

dig +short A example.com

You should see the new IP address:

203.0.113.50

Using nslookup

On Windows:

nslookup example.com

You can also specify the record type:

nslookup -type=A example.com

The result should show the expected IPv4 address.

You can also use reputable online DNS lookup services to compare results from different locations.

Verification is a critical step in How to Change DNS A Records.

How to Change DNS A Records in cPanel

If your DNS is managed through cPanel, you can usually edit A records through the Zone Editor.

Log in to cPanel.

Go to:

Domains → Zone Editor

Select your domain.

Click Manage.

Find the A record.

You may see something similar to:

Name: example.com
Type: A
Record: 198.51.100.10

Click Edit.

Change the IP address to the new server IP:

203.0.113.50

Save the record.

The exact cPanel interface can differ depending on your hosting provider.

If your domain uses external nameservers, changing a record inside cPanel may not affect the public DNS.

Always verify which DNS service is authoritative.

How to Change DNS A Records in Cloudflare

If Cloudflare manages your DNS, log in to your Cloudflare account.

Select your domain.

Go to:

DNS → Records

Find the existing A record.

For example:

Type: A
Name: @
Content: 198.51.100.10

Click Edit.

Change the content to:

203.0.113.50

Then save the record.

Your final configuration might look like:

Type: A
Name: @
IPv4 address: 203.0.113.50

Cloudflare provides current DNS instructions in its official DNS documentation.

Cloudflare Proxy and A Records

Cloudflare users may notice an additional setting related to proxying.

Depending on your configuration, an A record can be handled through Cloudflare’s proxy or DNS-only mode.

The behavior can affect how traffic reaches your server.

If you are troubleshooting a website after changing an A record, verify whether the record is configured as intended.

Do not change proxy settings randomly.

Check your hosting provider’s requirements, especially when configuring:

  • SSL
  • WebSockets
  • FTP
  • Mail services
  • API endpoints
  • Origin-server access

Understanding your DNS provider’s proxy behavior can make How to Change DNS A Records easier when using Cloudflare.

How to Change DNS A Records for a Subdomain

A records can also be used for subdomains.

Suppose you want:

app.example.com

to point to:

203.0.113.75

Create:

Type: A
Name: app
Value: 203.0.113.75

The result is:

app.example.com
        ↓
203.0.113.75

This can be useful for:

  • Applications
  • APIs
  • Staging websites
  • Development servers
  • Customer portals
  • Dedicated services

This is another practical use of How to Change DNS A Records.

How to Change DNS A Records When Migrating a Website

Website migration is one of the most common reasons people need to learn How to Change DNS A Records.

A typical migration looks like this:

Old Server
198.51.100.10
      ↓
New Server
203.0.113.50
      ↓
Update A Record
      ↓
DNS Propagation
      ↓
Visitors Reach New Server

Before changing the A record, make sure the new server is ready.

Migration Checklist

  1. Purchase or configure the new hosting.
  2. Upload website files.
  3. Import the database.
  4. Configure PHP.
  5. Configure the web server.
  6. Configure the domain.
  7. Install SSL.
  8. Test the website.
  9. Confirm forms and login work.
  10. Change the A record.
  11. Monitor traffic and errors.

[Internal link: How to Migrate a PHP Website to a New Server]

How to Change DNS A Records Without Website Downtime

If you are moving a live website, careful preparation can reduce downtime.

Before changing the A record:

  • Build the new server
  • Upload the website
  • Import the database
  • Configure the domain
  • Install SSL
  • Test the website
  • Check application settings

If possible, test the new server before directing public DNS traffic to it.

For dynamic websites, consider how database changes made during the migration window will be synchronized.

DNS changes alone do not guarantee a zero-downtime migration.

What Is DNS TTL?

TTL stands for Time to Live.

It determines how long DNS information can be cached by recursive DNS resolvers.

For example:

TTL: 3600

represents a cache duration of approximately one hour under normal DNS behavior.

A DNS provider may display:

TTL: Auto

instead of a number.

TTL is important when learning How to Change DNS A Records, particularly during migrations.

If you know that a server migration is planned, DNS administrators may lower the TTL ahead of the change. However, lowering the TTL immediately before changing the record does not instantly remove records that were already cached under an earlier TTL.

How to Check DNS Propagation

After changing an A record, check it from multiple DNS resolvers.

You can use command-line tools such as:

dig A example.com

You can also query a specific DNS resolver:

dig @1.1.1.1 A example.com

or:

dig @8.8.8.8 A example.com

These examples query public DNS resolvers operated by Cloudflare and Google.

If different resolvers return different IP addresses, the change may still be propagating or there may be inconsistent DNS configuration.

How to Check Your Website After Changing the A Record

DNS resolution is only one part of the process.

After completing How to Change DNS A Records, open your website:

https://example.com

Check:

  • Homepage
  • Internal pages
  • Images
  • CSS
  • JavaScript
  • Forms
  • Login
  • Database functionality
  • File uploads
  • HTTPS
  • APIs
  • Redirects

If your website loads correctly, confirm that it is actually being served by the new server.

You can check server headers, application information, or server logs to confirm the request reached the expected environment.

Common A Record Errors

When learning How to Change DNS A Records, beginners often encounter several problems.

Website Still Opens on the Old Server

Possible causes include:

  • DNS cache
  • Old A record
  • Incorrect DNS provider
  • www pointing elsewhere
  • Local DNS cache

Check the public A record using multiple DNS resolvers.

Website Shows an Error

The DNS record may be correct, but the new server may not be configured correctly.

Check:

  • Web server
  • Virtual host
  • Domain configuration
  • PHP
  • Database
  • File permissions
  • SSL

Domain Does Not Resolve

Check whether the A record exists and whether your domain’s nameservers are correct.

www Works but Root Domain Does Not

Check the DNS configuration for:

example.com

and:

www.example.com

They may use different records.

Root Domain Works but www Does Not

Your www record may be missing or incorrectly configured.

Check whether www uses an A record or CNAME.

How to Fix DNS Cache Problems

If you have changed the A record but your computer still reaches the old server, local DNS caching may be involved.

You can try:

  • Restarting your browser
  • Restarting your device
  • Flushing local DNS cache
  • Testing from another network
  • Testing through a mobile connection
  • Using dig
  • Using nslookup
  • Querying different DNS resolvers

For example, Windows users can run:

ipconfig /flushdns

On macOS and Linux, DNS cache behavior varies by operating system and resolver configuration.

Do not confuse local cache problems with global DNS propagation.

A Record vs AAAA Record

An A record maps a hostname to an IPv4 address.

An AAAA record maps a hostname to an IPv6 address.

For example:

A
example.com → 203.0.113.50

and:

AAAA
example.com → 2001:db8::50

If your server supports both IPv4 and IPv6, you may have both records.

If you change only the A record but leave an incorrect AAAA record, some users may still reach the wrong server over IPv6.

Therefore, checking both A and AAAA records can be important during server migrations.

A Records and CNAME Records

A domain can use a combination of DNS record types.

For example:

example.com
A → 203.0.113.50

www.example.com
CNAME → example.com

app.example.com
A → 203.0.113.75

This is a perfectly normal type of configuration.

The key is understanding what each hostname is supposed to do.

[Internal link: How to Configure CNAME Records]

A Records and MX Records

A records can also be related to email infrastructure.

For example:

example.com
A → 203.0.113.50

while:

example.com
MX → mail.example.com

and:

mail.example.com
A → 203.0.113.60

This means the website and email can use different servers.

Changing the website’s A record does not automatically change the MX record.

This distinction is especially important during website migrations.

[Internal link: How to Configure MX Records for Email]

A Records and SSL Certificates

Changing an A record can affect HTTPS.

Suppose your domain moves from:

Old Server
198.51.100.10

to:

New Server
203.0.113.50

The new server must be configured to serve the correct SSL/TLS certificate for the domain.

Otherwise, visitors may receive:

  • Certificate errors
  • Wrong certificate warnings
  • HTTPS connection problems

Before changing the A record, prepare SSL on the new server whenever possible.

[Internal link: How to Install an SSL Certificate on a Website]

How to Change DNS A Records for a New Hosting Provider

If you are changing hosting providers, follow this general workflow:

Current Hosting
      ↓
Set Up New Hosting
      ↓
Upload Website
      ↓
Import Database
      ↓
Configure Domain
      ↓
Install SSL
      ↓
Test New Website
      ↓
Change A Record
      ↓
Monitor

Do not change the A record simply because the new hosting account has been purchased.

The new website should be fully configured before public traffic is directed there.

How to Change DNS A Records for a Staging Website

A staging website can be placed on a separate subdomain.

For example:

staging.example.com

You can create:

Type: A
Name: staging
Value: 203.0.113.75

Then:

staging.example.com
       ↓
203.0.113.75

This allows developers to test a separate environment without changing the production website’s A record.

Remember to protect staging environments from unauthorized access and search indexing where appropriate.

Security Best Practices

After learning How to Change DNS A Records, follow these security practices.

Protect Your DNS Account

Use a strong password and multi-factor authentication whenever available.

Verify the New IP Address

Never copy an IP address from an untrusted source.

Document Existing Records

Save your DNS configuration before making major changes.

Check for Unauthorized Changes

If your website suddenly points to an unknown server, investigate your DNS account and hosting environment immediately.

Remove Old Infrastructure

After a successful migration, decommission unused servers and remove unnecessary DNS records.

Review A and AAAA Records

Make sure both IPv4 and IPv6 configurations point to the intended infrastructure.

Common Mistakes Beginners Should Avoid

When learning How to Change DNS A Records, avoid these common mistakes.

Changing the Wrong DNS Provider

Your hosting provider may not control your DNS.

Entering the Wrong IP Address

One incorrect digit can point your domain to another server.

Forgetting www

Check both the root domain and www.

Ignoring AAAA Records

An incorrect IPv6 record can cause some users to reach the wrong server.

Changing DNS Before Testing the New Server

Always test the new environment first.

Deleting Records Without Documentation

Save your current DNS settings before making changes.

Expecting Instant Propagation

DNS changes may take time to appear across different resolvers.

Forgetting SSL

Make sure HTTPS is configured on the new server.

DNS A Record Examples

Here are some simplified examples.

Root Domain

Type: A
Name: @
Value: 203.0.113.50

This can represent:

example.com → 203.0.113.50

Subdomain

Type: A
Name: app
Value: 203.0.113.75

This represents:

app.example.com → 203.0.113.75

www Using an A Record

Type: A
Name: www
Value: 203.0.113.50

This represents:

www.example.com → 203.0.113.50

These examples are for learning purposes. Always use your actual server’s IP address.

How to Change DNS A Records Safely

A safe approach is to follow this sequence:

  1. Identify the DNS provider.
  2. Record your current DNS configuration.
  3. Confirm the new server IP.
  4. Prepare the new server.
  5. Test the website.
  6. Check A and AAAA records.
  7. Update the A record.
  8. Wait for DNS caches to update.
  9. Test the domain.
  10. Monitor the new server.

This approach reduces the chance of accidental downtime.

A Record Change Checklist

Use this checklist when following How to Change DNS A Records:

  • Identify the authoritative DNS provider
  • Record the current A record
  • Confirm the new IPv4 address
  • Prepare the new server
  • Upload website files
  • Configure the database
  • Configure PHP if required
  • Configure the domain on the new server
  • Install SSL
  • Test the new website
  • Check the root-domain A record
  • Check the www record
  • Check the AAAA record
  • Change the A record
  • Save the DNS change
  • Verify with dig
  • Verify with nslookup
  • Test the website
  • Check HTTPS
  • Monitor the new server

Frequently Asked Questions

What is an A record?

An A record is a DNS record that maps a hostname to an IPv4 address.

How to Change DNS A Records?

Log in to the DNS provider managing your domain, find the existing A record, replace the old IPv4 address with the correct new IPv4 address, save the change, and verify the result using DNS lookup tools.

How long does it take for an A record to update?

The timing depends on DNS caching and the record’s TTL. Some users may see the new IP relatively quickly, while others may continue seeing the previous value for longer.

Can I change an A record without changing my hosting?

Yes. You can change an A record whenever you need to direct a hostname to another IPv4 address, provided the destination server is configured to handle the hostname.

Does changing an A record affect email?

Changing a website’s A record normally does not change MX records. However, if your mail server depends on the same hostname or IP infrastructure, you should review the entire DNS configuration before making changes.

Does an A record point to a domain?

No. An A record normally points a hostname to an IPv4 address. A CNAME points one hostname to another hostname.

What happens if I enter the wrong IP address?

Your domain may point to the wrong server, resulting in a website error, another website being displayed, or a connection failure.

Do I need to change the www record?

It depends on your DNS configuration. www may have its own A record or may use a CNAME pointing to the root domain.

Should I change the AAAA record too?

If your server uses IPv6, check the AAAA record as well. An outdated AAAA record can cause some visitors to connect to the wrong server.

Can I use an A record for a subdomain?

Yes. For example:

app.example.com → 203.0.113.75

can be configured using an A record for the app hostname.

Does changing an A record improve SEO?

Changing an A record itself does not improve SEO. However, correct DNS configuration is necessary for your website to remain accessible. During migrations, proper DNS and redirect configuration can help prevent technical problems that could affect search visibility.

Useful External Resources

For authoritative information about DNS, see the IETF DNS standards and IANA Root Zone Management information.

For Cloudflare DNS configuration, see the official Cloudflare DNS documentation.

For domain-related information, the ICANN website provides useful educational resources about the Domain Name System.

These resources can help you understand How to Change DNS A Records and learn more about DNS management.

Conclusion

Learning How to Change DNS A Records is an important skill for anyone managing a website or domain. A correctly configured A record connects a hostname to the IPv4 address of the server responsible for handling that hostname.

The process is straightforward: identify your DNS provider, find the existing A record, confirm the new server IP address, update the record, save the change, wait for DNS caching to update, and verify the result.

If you are moving a website to a new server, prepare and test the new hosting environment before changing DNS. Check your www record, AAAA records, SSL configuration, database, PHP environment, and other related settings.

Remember that DNS changes can take time to propagate through cached resolvers. Avoid repeatedly modifying records simply because you do not immediately see the new IP address.

Once you understand How to Change DNS A Records, you can confidently move websites between servers, connect domains to new hosting providers, configure subdomains, and troubleshoot common DNS problems without relying entirely on a hosting technician.

How to Configure CNAME Records: 7 Proven Easy Steps

Previous article

How to Connect a Domain to Web Hosting: 7 Easy Steps

Next article

Comments

Leave a reply

Your email address will not be published. Required fields are marked *