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
Workflows That Work: How Make.com and n8n.io Are Saving Small Businesses Time
June 16, 2025
Cybersecurity for Healthcare Websites: What You Need to Know (and Where to Look)
5 Essential Features for a Small Business Website
June 10, 2025
What to Do If Your Website Starts Sending Spam Emails
April 15, 2025
Simple Membership Plugin: Setup
January 31, 2025
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