Boolhwi
Boolhwi

Reputation: 69

How to use local domain name instead local ip address in Mac?

I want to access to my local web-server in mac with domain name instead ip address at other devices.

For example, 'custom.domain:8080' instead '192.168.xx.xx:8080'

What is the most simple way to achieve it?

Thanks.

Upvotes: 5

Views: 4932

Answers (2)

Michael Nelles
Michael Nelles

Reputation: 6032

Specific example: settings > WiFi > Details

Edit the file /etc/hosts, and add the following line:

192.168.0.105 mydomain.com

enter image description here

Upvotes: 0

Kaka Ruto
Kaka Ruto

Reputation: 5145

Edit the file /etc/hosts, and add the following line:

192.168.xx.xx custom.domain

Then visit http://custom.domain:8080

Upvotes: 8

Related Questions