# Laravel Forge

How to Simulate a Website Launch Using the "hosts" File on Your Mac

If you have make a DNS change to launch a new website, but you'd like to check the site out before the DNS change propagates you can do the following:

  1. Open terminal

  2. Use nano to edit the hosts file with this command

    sudo nano /etc/hosts
    
  3. You will need to enter an admin password to edit the file.

  4. Quit your web browser.

  5. Flush the DNS cache using the following command

    sudo killall -HUP mDNSResponder; say DNS cache has been reset
    
  6. Try to visit the site.

  7. Under the steps above to put it back the way it was.

Last Updated: 3/25/2021, 6:42:18 AM