Where to put 301 redirects in Magento?
-
I will be changing the URL structure in a magento store from "base/category/subcategory/product" to "base/product" which means i have to make over 1000 URL 301 redirects so our old links still work.
Should i put the redirects in a .htaccess file so they stay intact no matter what or should i just put them in with all the other rewrites (in Magento 's URL rewrite manager)?
Thanks
-
Yes I suppose it would check everytime. That said, i have written files with several hundred lines of code and the sites still load really fast even on shared servers which are not the best...
-
Will that in any way slow down the site? Adding thousands of lines of code to the .htaccess file?
Edit: Checked some more, apparently having thousands of redirects in .htaccess file shows things downs, since Apache scans the file each time a new page is opened.
tl/dr: Stick with magento URL rewrites
-
I think either is fine as long as it works. Personally I prefer to writ my own .htaccess files as I then understand exactly what I have done - it feels safer for some reason.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Should I make a new URL just so it can include a target keyword, then 301 redirect the old URL?
This is for an ecommerce site, and the company I'm working with has started selling a new line of products they want to promote.Should I make a new URL just so it can include a target keyword, then 301 redirect the old URL? One of my concerns is losing a little bit of link value from redirecting. Thank you for reading!
Technical SEO | | DA20130 -
301 redirect and search engines
How long until 301 redirects get recognized by search engines? I noticed my link on Google isn't forwarding over to my new domain even after the 301 redirect. If I go to the site directly, the 301 redirect works. Anyone know how long it takes for search engines to pick it up? Thanks!
Technical SEO | | timeintopixels0 -
301 redirect new site design
Hi I'm just setting up some 301 redirects for a new site design about to go live. The old site structure had some 'overview' pages in the urls (without any content) that just 302'd to a sub page. Do i need 301 redirect these overview page urls or since they had no content theres no need and I probably shouldn't or should i ? Also for pages that have no direct equivalent replacement is it still best to 301 to nearest relevant page or just leave it. For example a thank you page that currently shows after user submits email form wont be on new site (since message shows on form page after submission rather than new page). Should i 301 to form page or just leave it ? Cheers Dan
Technical SEO | | Dan-Lawrence0 -
301 Redirect with an Exact Domain name Match
My Client had a site that ranked for a pretty competitive two word phrase, but for a variety of reasons had to transfer the site to a different domain name (with none of the previous keywords). We've 301'd everything just fine to the new site, but our traffic for that two word phrase, as well as related long tail traffic, is beginning to drop. Could the drop be related to something that we didn't do well in the transfer? Or is it due to the new domain name now not being an exact match? Sitenote question: Our Google Analytics is still set up for the former domain name and shows data just fine. Is there any reason to switch GA to the new domain? What are the pros/cons? Much thanks in advance!
Technical SEO | | TrevorMcKendrick0 -
How to safely reduce the number of 301 redirects / should we be adding so many?
Hi All, We lost a lot of good rankings over the weekend with no obvious cause. Our top keyword went from p3 to p12, for example. Site speed is pretty bad (slower than 92% of sites!) but it has always been pretty bad. I'm on to the dev team to try and crunch this (beyond image optimisation) but I know that something I can effect is the number of 301 redirects we have in place. We have hundreds of 301s because we've been, perhaps incorrectly, adding one every time we find a new crawl error in GWT and it isn't because of a broken link on our site or on an external site where we can't track down the webmaster to fix the link. Is this bad practice, and should we just ignore 404s caused by external broken URLs? If we wanted to reduce these numbers, should we think about removing ones that are only in place due to external broken URLs? Any other tips for safely reducing the number of 301s? Thanks, all! Chris
Technical SEO | | BaseKit0 -
Redirects
Hello, My question is: how important is it to wait for the a redirect to get seen and cached before you take down the old page? More in depth: my old platform has seriously limited my ability to add sitemaps and make edits to htacces. I just want to change nameservers (which will delete everything on there) and upload the htaccess is that alright? Another way of saying it: when redirecting a page, is it necessary for google to see the old page before it is deleted? Thanks Tyler
Technical SEO | | tylerfraser0 -
Google Confusion: Two Sites and a 301 Redirect.
Hi, We have a client who just sprang a new project on us. As always, they went ahead and did some stuff before bringing us into the loop! (oh the joy of providing SEO services!) Anyway, i'm pretty swamped right now and need some extra brains on this. Basically the client had www.examplesiteA.com online for many years (an affiliate site which had built up a strong brand in the industry). They have now decided to turn this affiliate site into a full blown service platform and so with the new site being built they 301'd the whole thing over to www.examplesiteB.com - this is where they want all the old affiliate content to be hosted. So essentially examplesiteA.com is now examplesiteB.com and a new site is being placed on examplesiteA.com - still with me? So this has all happened and a brand new website is on examplesiteA.com and the old examplesiteA is now sitting exactly as it used to, but on the examplesiteB domain. The 301 redirect has been removed and the new examplesiteA seems to have been crawled, but the homepage is not indexed. When you search for examplesiteA, examplesiteB is the top result. Now they are similar domain names and to be fair I have very little data at this point i.e. I don't know when the 301 redirect was removed and it maybe that this all fixes itself with time. How is link equity effected now that examplesiteA.com was 301 redirected to examplesiteB.com and cached in this way, but now the 301 redirect has been removed and does not exist? Would link juice have been diluted throughout the process? Obviously if we had been in on all this before anything was implemented we would have done things differently. Interested to hear what others would do coming in at this point. Thanks and look forward to the advice!
Technical SEO | | MarcLevy0