Major site rewrite and SEO with 301 redirects

2019-09-08 08:42发布

问题:

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.

回答1:

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



回答2:

At that scale you probably want to write some custom code and an indexed database table to retrieve the redirect info.



回答3:

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.



回答4:

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



标签: seo