Helen
Helen

Reputation: 3

Custom domain use CNAME in local test

I am working on features like those provided by github.io, which provides custom domain for each collection of article of a user, new I've tested this by changing hosts, and I want to test for the real-world simulations performed locally, how can I start in my LAN? Now I read some articles about dnsmasq, but I'm still not very clear.

Things I do are like this: When user A has a collection, he can access it in https://ourserver-example.com/collcetion-of-a Then he can add his personal domain like my-collection.io After he configs it in our system, he can access his collection by https://my-collection.io

Now I want to figure out how do I test this my-collection.io domain in local, need I build a local dns server and add a cname record to associate the my-collection.io to ourserver-example.com?

Upvotes: 0

Views: 2205

Answers (1)

Ked Mardemootoo
Ked Mardemootoo

Reputation: 1605

You can just add an entry in your host file like this:

192.168.10.10 my-collection.io

Where the IP address is the IP address of the server/machine where the application is running. If running in your local machine on localhost then set this:

localhost my-collection.io

Upvotes: 2

Related Questions