Question

How to configure WordPress at mainsite.com/blog when it's really at blog.mainsite.com for SEO ?

Posted June 14, 2021 136 views
WordPress

Hi,

We do not wish to host our WordPress server on our main website. WordPress is a past/present/future trainwreck and I don’t want it causing problems with our main website. It needs its own Droplet at blog.mainwebsite.com

We can easily use Nginx proxy-pass to pass the user from mainwebsite.com/blog to blog.mainwebsite.com. This looks seamless to the user, and to Google for SEO on the address bar. Unfortunately, once any link on the WordPress install is clicked the address link is sent back to blog.mainwebsite.com. The reason for this is, the WordPress Address and Site Address config settings are set as blog.mainwesbite.com.

I tried changing WordPress Address and Site Address config settings to mainwebsite.com/blog but this result in errors.

I’m unsure what settings need to be changed on my WordPress config settings to make this possible. Anybody do this before?

Any help is much appreciated.

Regards,

W.

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.

×
Submit an Answer
1 answer

Hi @wyatt541c2d7c8900f36752314,

What you are trying to achieve as far as I know is not achievable, at least in your current setup. You can’t have your subdomain load as mainwebsite.com/blog but it actually being blog.mainwebsite.com. Even more so when they are on a different Droplet/Server.

If they were on the same Droplet, maybe you can create some kind of an alias. Even with an alias, it won’t work as you expect. Additionally, even if you make it somehow work it will be messy and not worth it.

I strongly agree, either just staying with blog.mainwebsite.com or just adding your Blog as a directory inside your mainwebsite.com.