Forum Moderators: open
So we need to redirect users from maindomain.com to sub.maindomain.com for a short period.
What is the best way to do this?
By the way all page links remain the same on the sub domain as on the old domain. So on the old site maindomain.com/randompage.html will still work on sub.maindomain.com/randompage.html
1. Will you be using a relative URL (through Base Href)? If yes, the indexed pages will still point to the correct URL when you finally switch.
2. Do you intend to 'remove' the subdomain once the switch is effected? I would advise you to check if search engines have indexed your site (subdomain) before you remove. If they have, you may want to let the subdomain live a little longer before phasing it out.
3. If the content on the main domain and the subdomain is identical, your site can get penalized for duplicate content.
4. Maybe, you can have an 'exclude' comment in your robots.txt file of your server to prevent indexing of the content you do not want to be crawled.