Question

How to setup subdomain/multisite openlitespeed wordpress version

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.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
February 28, 2023

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.

This promotional offer applies to new account only.

© 2023 DigitalOcean, LLC.