I am using Windows 10 with IIS enabled.
I need to setup local websites on different ports with hostnames which I can access locally by using those hostnames.
For e.g.
Website Name: abcd website
Path to Directory: D:/Projects/Websites/abcd.com
Hostname: abcd.com
Port: 1001
Currently I can access the website with localhost:1001 or 127.0.0.1:1001 But I'm looking forward that my local websites should get resolved with hostnames. So, if I go to http://abcd.com/ it should take me to http://localhost:1001/
With this I wish to setup subdomains to some websites as well. I need help to achieve this.
If you want to do this locally then modifying the HOSTS file of the server hosting your site to point to the local machine's IP when visiting the abcd.com domain should do it.
Modifying your hosts file allows you to override the DNS for a domain, on that particular machine. This is useful when you want to test your site without the test link, prior to going live with SSL; verify that an alias site works, prior to DNS changes; and for other DNS-related reasons. Modifying your hosts file causes your local machine only to look directly at the IP address specified.
Add the following entry to the file:
Local IP Address www.abcd.com
Click File > Save to save your changes.
Source: http://www.rackspace.com/knowledge_center/article/modify-your-hosts-file
NOTE: If you want to do this from another computer you have admin rights on then you use the same approach. If you want to do this from another computer you do not have admin rights on then you should go about getting a dedicated DNS entry set up for this site
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With