I have a website (powered by Rails/Postgres and nginx) where I had setup a blog and a coupons section as:
http://examplecom/blog/ http://example.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 don't 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.example.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.