When buying products or services on our site, we often receive affiliate commissions that support our efforts. Learn More

Cloudflare Settings to Update After Changing IP Address or Web Host

DNS A record SPF TXT record

Every web server, website, or device that connects to the internet is designated its own IP address in order to communicate with each other.  If you’ve recently changed your web host, server IP address or the type of hosting plan, the IP address your website is pointing to may also need to be updated.

Your web host should be able to do this for you but if you’re using a CDN like Cloudflare, you will need to login to your Cloudflare admin dashboard and manually update the IP address.

The Cloudflare settings that need to be updated after changing web host or IP address is the A records and SPF TXT records from the DNS tab.

It should be noted that the DNS cache from your browser and computer may also need to be flushed if changes aren’t reflected after updating the A records.

The whole process is fairly straightforward.  To get started, go ahead and log into your Cloudflare account, select your website, and navigate to the DNS tab.

Cloudflare DNS settings

 

 

UPDATE A RECORDS & SPF TXT RECORD

The A record in Cloudflare is the address mapping record which is used to point your website to the server.  After changing a web hosting company, your website needs to point to the IP address of the new server.

HOW TO UPDATE A RECORDS

  • 1. Access the A records from Cloudflare DNS settings tab.
  • 2. Locate the A record of your website URL with the orange cloud.DNS A records
  • 3. Replace the old IP address with the new IP address that was provided by your web host.
  • 4. Replace all other A records with the old IP address to the new IP address.
  • Note that the A records are for IPV4 addresses.  If using an IPV6 address, it will use AAAA records.

Next, you should update the SPF TXT record.  Although this isn’t necessary to get your website up and running,  the SPF TXT record should be updated to specify the IP address that is authorized to send email on your behalf.

HOW TO UPDATE SPF TXT RECORD

  • 1. Access the TXT records from Cloudflare DNS settings tab.
  • 2. Locate the TXT record with your website URL with the content that begins with v=spf1 a mx or v=spf1 +a +mx and click it.DNS SPF TXT record
  • 3. Delete only the old IP address and replace it with new IP address.

  • v=spf1 a mx ip4:xx.xx.xxx.xxx ~all
  • 4. Click save and exit.

 

 

 

CLEAR DNS CACHE FROM BROWSER & COMPUTER

Now that the IP address from A records have been updated, try accessing your website from your browser.  If you’re getting an error, you’ll likely need to clear your DNS cache from your computer and web browser.

HOW TO CLEAR DNS CACHE FROM CHROME BROWSER

  • 1. Open Google Chrome and type the following in the address bar.

  • chrome://net-internals/#dns
  • 2. Click Clear host cache.  You may also need to flush socket pools after flushing DNS.clear dns cache browser
  • 3. Type the following in Chrome address bar.

  • chrome://net-internals/#sockets
  • 4. Click Close Idle Sockets, then click Flush socket pools.close idle sockets

Sometimes clearing DNS cache from browser should properly refresh your website so try and reload your website from the browser.  If changes are still not reflected, clearing the DNS cache locally from your computer should do the trick.

HOW TO CLEAR DNS CACHE FROM COMPUTER

Windows OS:

  • 1. Open Command Prompt clicking on the magnifying glass from Windows taskbar and type CMD.cmd prompt
  • 2. Once the black Command Prompt box is open, type the following and hit Enter.

  • ipconfig /flushdns
  • 3. The DNS cache should now be flushed.

MAC OS:

  • 1. Open terminal.app by pressing Command + Space and search for terminal.
  • 2. Once it is opened, type the following and hit Return.

  • sudo killall -HUP mDNSResponder

 

 

 

SUMMARY

This tutorial explained the updates that are required after changing your IP address for your website.  These steps need to be taken whenever you change your web hosting provider, server IP address or sometimes the type of hosting plan with your current web hosting company.

  • Update A records
  • Update SPF TXT record
  • Clear DNS cache from browser
  • Flush DNS cache from computer

 

You May Also Like

Leave a Reply

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