In this blog, we are going to discuss how to add any domain name in your localhost on a windows machine. We require this type of setup especially when developing/running multiple applications, and also to handle CROS effectively during application development.

Step 1 : Open C:\Windows\System32\drivers\etc\hosts in your editor

Step 2 : Add desired domain name incluing subdomain in your hosts file

Step 3 : Check your localhost on some port using any application

Step 4 : Check with your specified domain

Congrats! all set now.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.