apple_pie
apple_pie

Reputation: 339

How do I reach my local development server (127.0.0.1) with a domain name (e.g. www.mydomain.example)

web newbie here, I need to do some testing so I need to reach my development server (127.0.0.1 on Mac OS X) with a 'real' domian name (e.g. www.mydomain.example). any ideas?

Upvotes: 0

Views: 878

Answers (1)

Pekka
Pekka

Reputation: 449613

If it's for your machine only, manipulating the hosts file is the best option.

Add the following line to it:

127.0.0.1    www.mydomain.com

where it is located depends on your OS. If on Windows, do a search for hosts in C:\Windows\system32

You may have to restart your browser for it to take effect.

Upvotes: 7

Related Questions