February 10, 2023
To update the DNS settings on your local machine to reach a development site hosted on another server, you’ll need to add an entry to your machine’s hosts file. The hosts file is a simple text file that maps domain names to IP addresses and is used by your operating system to resolve domain names before querying a DNS server.
Here’s how you can update your hosts file:
192.168.1.100 mydevsite.local
ipconfig /flushdns
. On macOS and Linux, you can run the command sudo killall -HUP mDNSResponder
.Once you’ve made these changes, you should be able to access your development site using the domain name(s) you specified in the hosts file, without having to modify the DNS settings of your local machine or the server hosting the development site.
Keep in mind that the hosts file only affects the resolution of domain names on your local machine. If you need to access your development site from other machines, you’ll need to update the hosts file on each of those machines as well.
STEPS ON A MAC
More Post to read
April 23, 2024
SQL URL Replacer – From Local to Live
April 21, 2024
Building an Accessible Accordion Component
Good Reason to Run both Cloudflare and Wordfence on Your WordPress Website
March 27, 2024
March 20, 2024
March 4, 2024
Updating Your Hosts File: Exclusive Server Preview
February 23, 2024
How to Get a Google MapsJavaScript API Key
November 2, 2023
Steps to setup a Google Cloud Account for Google Map API
September 13, 2023
March 15, 2023
Difference between CNAME and A records!
February 10, 2023
Update DNS on local machine for development