1

I have a node js application that runs on a VPS, and recently we added a blog to the site, we choose WordPress for the blog CMS, for avoiding configuring VPS for PHP and WP we moved blog to another host with cpanel and different ip on a blog.domain.com subdomain. Now we decide for some reason (SEO and etc) to move from subdomain to subfolder of the main domain.

So my solution so far is that main domain is point to VPS ip, and nginx handle all requests, and if the requested url followed the /blog/* pattern, the nginx redirect request to the second host ip with cpanel where blog is hosted.


Now I have these questions:

  1. Is this way a proper way to resolve this challenge? Is there better way?

  2. Is redirecting to another IP BAD for SEO? Or it's OK?

1

There is no SEO benefit to hosting your blog on a folder compared to as on a subdomain. See Do subdomains help/hurt SEO?

You don't want to do any redirecting. Redirects change the URL in the browser address bar. Redirecting to change the URL to a different IP address would be far worse for SEO than hosting on a subdomain.

If you insist on having it in the folder location, you will need to use a "reverse proxy". A reverse proxy copies the content from another location dynamically on the fly. Nginx has functionality for it built in. See: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

A reverse proxy can also be bad for SEO because it introduces performance delays. If you are using a reverse proxy, make sure the two machines are near each other, like on the same subnet in the same data center.

  • Thanks for the answer. But we get most of the traffic from our blog, what about all the blog traffic that is not count for the main domain? Or is that really matter? I have experience from another project that when we moved blog from subfolder to subdomain the page rank felled tremendously! I just figured it was probably duo to this! – Sinandro Dec 8 '18 at 16:23
  • Any time you move content it can cause rankings to fall. The best bet it to pick a place and stick with it. – Stephen Ostermiller Dec 8 '18 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.