Hello, I’ve been trying to setup a subdomain on my droplet but even the subdomain redirects to the main domain.
The setup is a main domain installed that it’s working on wagnercaetano.com but as I need another instace of wordpress. I’m trying to setup another wordpress website in this url: “ecommerce-example.wagnercaetano.com” and so far I’ve already setup the DNS record in cloudflare like:
A - wagnercaetano.com - https://192.241.xxx.xxx
A - ecommerce-example.wagnercaetano.com - https://192.241.xxx.xxx
Also configured 2 virtual hosts:
wagnercaetano.com - /var/www/html
ecommerce-example.wagnercaetano.com - /var/www/html/portfolio-websites/ecommerce-example
And I’ve setup those both virtual hosts on listeners following the same name and pointing to the correct virtual host. But everytime I try to connect into the subdomain instance, I’m redirect to the main domain.
This textbox defaults to using Markdown to format your 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.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.
This promotional offer applies to new account only.
Hi there,
As far as I can see you don’t have an active A record setup for the subdomain that you’ve shared.
It looks like that you are using the Cloudflare nameservers which means that you need to add the DNS record on their end.
Once you add the A record for your subdomain name it might take up to a few hours for the DNS cache to clear over the Globe before you could see the new records.
You can use this tool here to do DNS lookups:
https://www.digitalocean.com/community/tools/dns
Let me know how it goes!
Best,
Bobby