Mobile app version of vmapp.org
Login or Join
Sarah324

: Moving from Subdirectory to Subdomain structure 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/

@Sarah324

Posted in: #301Redirect #Redirects #Subdomain

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

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

2 Comments

Sorted by latest first Latest Oldest Best

 

@Turnbaugh106

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

10% popularity Vote Up Vote Down


 

@XinRu657

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).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme