Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a website (powered by Rails/Postgres and nginx) where I had setup a blog and a coupons section as:

http://myrailsapp.com/blog/ http://myrailsapp.com/coupons/

Blog is powered by wordpress and similarly the coupons section is powered by PHP/Mysql.

The traffic of my website has increased a lot over the last 6 months. So, the thought was to move Blog and coupons on a different server and hence I dont need to run mysql/php etc where my rails app is running, reducing my memory footprint as much as I can. So I am planning to move to subdomain structure from the existing subdirectory structure.

1) Is the above thought process correct?

2) How much SEO impact would I have, if I move from subdirectory to subdomain and set up 301 redirects. My subdirectory structure for coupons is indexed quite well in Google. So any mistake here could be costly :(

3) I am not an expert on Nginx, so I ended up writing whatever I could:

location ^~ /coupons/ {    
rewrite ^/coupons(.*) http://coupons.myrailsapp.com$1 permanent;
}

Would that set up 301 redirects correctly? Is there something else that I am missing here? Or is that all about it? Anything else in the above code that I must take care as far as SEO also goes.

share|improve this question

2 Answers 2

1) Is the above thought process correct?

Providing that you are moving PHP/MySQL to a server with the same (or greater) resources as PHP/MySQL are presently using, then yes this would be a wise move.

2) How much SEO impact would I have

Subdomains and subdirectories are considered analogous by Google so, while there may be a temporary drop in ranking as your redirects are spidered, the net effect will be minimal after Google associates your new subdomain URI's with your old subdirectory URI's and their rankings.

3) I am not an expert on Nginx, so I ended up writing ...

Consider searching for similar questions and, if necessary, asking server configuration questions at ServerFault (server configuration is generally beyond the scope of Pro Webmasters; see the FAQ for details).

share|improve this answer

Make sure Apache rewrite engine on. Check the code that you have mentioned above working fine in the local machine. If it is working fine and everything redirected well to the targeted sub-directory, just upload the necessary files into the website. Check if everything works well on the website. Permanent redirection is search engine friendly so you need not to worry of the ranking positions for keywords in Search engines

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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