✓ Solved

Multiple WordPress (2 different Domains) on 1 Linode server

Hello all!

I've googled and searched and spent hours on this issue and haven't found the fix or solution so far.

My issue is I'm trying to run 2 WordPress websites from 1 Linode host server. I've followed all the guides online and my main issue is that when I access " website2.com " it always reroutes back to " website1.com " for some strange reason.

Running Ubuntu 21.04 (all updated)
WordPress runs perfect, including any subdomains I've tried from " website1.com "
Added a separate WordPress installation on the server, tested with subdomain first and was working perfect. Then tried to attach it to a separate domain, corrected all the URLs in the .conf files, database, directories, etc.

Troubleshooting Steps taken:

  • Followed this guide:
    https://www.linode.com/docs/guides/configure-apache-to-run-multiple-wordpress-sites-on-one-linode/

  • Followed many other similar guides from Google. No Luck

  • Added 2nd Domain to " hosts " file

  • Removed any symbolic links that might have been causing issues

  • a2ensite both *.conf sites

  • service apache2 reload

  • apachectl -S " to see if both domains are listed and they are "

  • apache2ctl -M " check if rewrite_module (shared) and it is "

  • systemctl status apache2.service " everything active and no errors "

  • checked the WordPress databases, correct URLs are listed

  • A, AAAA, CNAME records all point to the Linode Host IP on both domains

As a temporary fix, I've just swapped the directory names of " website2.com " to " website1.com " and the 2nd website is working for now and I understand it's a horrible hack for the time being.

I'm out of options to try and fix this issues other than starting over again but I'd rather not go that route just yet as there's a lot of work I put into the host server to get it running.

Thank you all for the help in advance.

9 Replies

✓ Best Answer

GoDaddy renewing your client’s hosting service has nothing to do with with the website domain name issue.

You DO NOT need to wait 30 days for GoDaddy’s service to expire since domain names can be pointed to another host or server at anytime. Granted it takes 24+/- hours to resolve.

What you have is a DNS issue somewhere, somehow due to you not configuring something correctly…

Did you create a virtual host file for each domain?

Whose nameservers are you using… Linode or that of your registry?

I have created separate virtual host files for each domain and the nameservers are not from Linode, they are from my registry.

The name servers would (should) point to Linode since it sounds like you’re using Linode’s DNS.

I changed all the nameservers to point to Linode now on both Domains and still no luck.

Every time I try to access " website2.com " it always redirects me back to my " website1.com " for some strange reason. I can't seem to figure out why it's doing this sadly.

Thank you all for the replies.

Every time I try to access " website2.com " it always redirects me back to my " website1.com " for some strange reason. I can't seem to figure out why it's doing this sadly.

You need to be more patient. Depending on your location, the conventional wisdom about the time it takes to propagate DNS changes can be up to 48 hrs.

-- sw

Hello everyone again,

It's been a few days now, well over 48 hours and still having this redirect issue.
What I've done to date is:

  • Transferred all DNS information over to Linode on both Domain Names.
  • Double checked all spelling, settings, directories on the Linode server.
  • Both WordPress installations do work with a simple test of renaming the directories to test.
  • Linux server is all up to date

I'm still at a loss of what could be holding " website2.com " from working properly.

More Suggestions welcome, thank you for all the replies.

It would be best if you posted both urls so one of us could do a DNS check to see what the issue could be.

Just a quick update on my issue.

I eventually called up GoDaddy, the registrar of the Domain that was giving me issues.

Long story short, I found out they renewed my client's hosting services for 1 month during some mix up when all this was being transferred over to Linode and I suspect that's what was giving me all the issues.

I'll have to get back to you all in 1 month's time when hosting expires and try again.

Thank again everyone for the help!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct