Easily configure a performant, secure, and stable NGINX server.Learn More
Problem with newly added subdomain is automatically redirect to SSL
I’ve already had a droplet which previously has been setup with:
- Nginx server
- A domain (example.com)
- Re-route www.example.com to example.com as always.
- Installed and config Let’s Encrypt for both example.com and www.example.com
- All HTTP will be redirected to HTTPS.
So at current state, all will be redirected to https://example.com and it is working fine.
Now, I want to add a subdomain into this droplet. I visit Networking section, add a new A record
sub.example.com. 1800 IN A 184.108.40.206
The ping works fine, it can send the packets.
When I type the address sub.example.com to web browser, I mean plain
http://sub.example.com, it just automagically redirects to
https://sub.example.com while I haven’t set up anything for SSL.
I also tried to add a virtual host entry for
sub.example.com to nginx server, it just keeps redirects to the same route
error_log to nginx server config. No entry added if I visit the sub-domain.
Anyone have idea on this case? I search over Internet but haven’t found any case similar to mine.
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.×