I am currently working on a relaunch of a high trafficed website with thousands of pages. All urls are changing and for SEO reasons i know we should be putting 301 redirects in for old page to new page mappings. However, the old site has tens of thousands of pages, do i really put thousands of 301 redirects in place? isnt that bad for performance reasons? Any other suggestions or ways?
Thanks in advance.
If the URLs follow a regular pattern then you can set up more general redirects based on the format. For example if you're redirecting /category/page.php
to /othername/page
that is very easy to do with regular expressions in any server.
If there is no pattern then you could keep a lookup database that you check to redirect. It may be a little bit slower but not terrible performance. You can still list the top 50 or so pages to redirect in your server config.
Note, if you are using Apache then it's strongly recommended to put the redirect rules in your httpd.conf (stored in memory when Apache starts) and not .htaccess files (which are loaded on every page request).
At that scale you probably want to write some custom code and an indexed database table to retrieve the redirect info.
You're probably going to want to take a look at the most important pages on the site - perhaps categories and start the redirecting from there. There's no way you're going to be able to do tens of thousands of redirects because as you mentioned, there will be performance issues with that.
to make this simple, you can use wildcards and regular expressions in htaccess.
it'll only work if your website is properly organized in categories