0

We have a subdomain which is implemented in WordPress: https://blog.aisee.co.in/ and it has more than 2000 posts in it.

As per SEO perspective, we wanted to migrate the subdomain to the main root domain: https://www.aisee.co.in/

So we created a folder/directory where we want to migrate subdomain post articles: https://aisee.co.in/scholarship/ (it is also in WordPress)

Keeping SEO Ranking Factors in mind, We want to 301 redirect the subdomain url to new url: For Example -

We wanted to Redirect: https://blog.aisee.co.in/manipal-university-dr-tma-pai-scholarship/ to https://aisee.co.in/scholarship/manipal-university-dr-tma-pai-scholarship/

Currently, we have imported all the subdomain articles to the root domain and there are more than 2000 URL need to be 301 redirected.

Instead of manually redirecting each URL, I wanted to know if there is any pattern matching or easy way to redirect all these URLs at once.

If there is an easy way out either through a plugin or through code then please do let know. It would be very helpful.

Thank you.

  • Check over on Stack Overflow. There is likely an answered question that will show you what to put in .htaccess. Also, keep in mind: the fact that you're moving all these posts will impact your SEO negatively. You'd likely be better off building more links between subdomains instead of actually moving that much content. And, if you really want search engines to think it's all a single site, make sure that the WP URL can only be accessed at www.example.com/wpurl since you are using www.example.com. If you have set it up at example.com/wpurl with no "www" search engines see it differently. – WebElaine Aug 16 at 13:29
  • Thank you. I will look into it – Arush Agarwal Aug 17 at 6:03
0

The Webmasters' StackExchange has a solution that sounds perfect for you.

Below, I have adapted it to your specific request. Hope this helps!

Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www)\. [NC]
RewriteCond %{HTTP_HOST} ^blog\.aisee\.co\.in [NC]
RewriteRule (.*) http://aisee.co.in/scholarship/%1 [R=301,L]

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.