DEV Community

StuartCreed
StuartCreed

Posted on • Updated on

Using hosts file to test websites with live domain on Mac - TEST LIVE

cd /etc

sudo nano hosts

Insert the below:

127.0.0.1 websitesareawesome.co.uk www.websitesareawesome.co.uk

Then when you go to websitesareawesome.co.uk or www.websitesareawesome.co.uk in the browser it will actually be looking at the source from 127.0.0.1 but using those domains.

Top comments (0)