Question

Why ngixn serverblock with subdomain only responds to full URL with /index.html

I have followed this tutorial : Example link

I used a domain, and one of its subdomains in place to text.com and example.com

Both can be served but the subdomain only responds if I include http:// & /index.html

Why is this and how can I configure the server to respond to subdomain.domain.com without the full url?

Subscribe
Share

Thank You It appears DNS cache was the issue. A good reason to always test web development on more than one browser or machine.

Sounds like DNS cache. Try with a different device. Sometimes differents browsers work too.

I will add that when I try subdomain.domain.com the server sends me to the default server block as though it is a non-matching request.

Only the full http://subdomain.domain.com/index.html returns the page


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @nico37d4af391be416669ae877:

Thank You It appears DNS cache was the issue. A good reason to always test web development on more than one browser or machine.

View the original comment