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
Essential Tools for Checking ARIA Compliance in Web Development
October 1, 2024
Secure Your WordPress Site with a Robust .htaccess Configuration
September 3, 2024
Setting Up a New Business: Should You Choose Google Workspace or Office365?
August 29, 2024
How to Add a Domain that Works with All Google Maps Platform APIs
July 3, 2024
June 20, 2024
May 11, 2024
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