Temporary Redirects on Magento
-
I've recently taken over a client who uses the Magento platform and there was definitely a duplicate issue with his homepage. It redirected www to non www, however the canonical tag was setup wrong and pointing to the www version.
When I looked at OSE for both versions the non www has only 7 linking domains and a page authority of 32. The www version has 24 linking domains and page authority of 39. As the domain is fairly new, I decided to redirect the non www to www and keep the canonical the same. (I changed the internal linking structure etc).
When I run both URLs through this tool: http://www.ragepank.com/redirect-... it's returning a whole bunch of 302, rather than 301 redirects. What's the deal with that? Is that a Magento setting that I can fix or something a little harder?
I'm not sure if it's proper etiquette to post the URL of a client, so if that would help and is OK, please let me know.
Thanks
-
Been looking for this for ages.
Thanks
-
Wouldn't call myself an expert by any stretch, however, I've have set up and still run a few Magento stores.
The reason I asked which version your site is running, is because I believe they rolled out the 301 option in version 1.4.2.0 (based on the release notes I checked). Definitely strange you don't see it when using version 1.5.1.0.
You can solve it instead, as you rightly point out, using a rewrite rule in .htaccess, like the second extra rule from the Creare article:-
RewriteCond %{http_host} ^yourdomain.co.uk [NC] RewriteRule ^(.*)$ http://www.yourdomain.co.uk/$1 [R=301,NC]
I don't usually find I need this, because Magento solves the www issue with that 301 dropdown menu option which is missing for you.
I don't generally need the first extra rule from that article, either:-
RewriteCond %{THE_REQUEST} ^./index.php RewriteRule ^(.)index.php$ http://www.yourdomain.co.uk/$1 [R=301,L]
When I switch on Web Server Rewrites in the Magento backend, and correct the Magento root (if necessary) in .htaccess, as described in that article, the removal of index.php from URLs is usually solved. If you do still have the index.php problem, however, you could solve it in .htaccess too.
I'm definitely not an apache/mod_rewrite expert so I can't vouch for the syntax necessarily, however it certainly looks correct.
If I were you (or your client), I'd also want to get to the bottom of why I don't see that 301 option in Magento, as it could be symptomatic of an incomplete upgrade in the past. It could of course, be something else obvious which I'm missing - definitely worthy of further investigation though.
-
Hi Neil,
1.5.1.0.
Do you have much experience in rewriting htaccess files for Magento? I assume this article pretty much sums it up?
http://www.crearegroup-ecommerce.co.uk/blog/e-commerce-seo/htaccess-rewrites-for-magento-shops.php
Cheers
-
Hey Brad.. that is strange. I guess the next logical question would be which version of Magento is the site running?
-
Haha I only have two options (Yes or No):
| <label for="web_url_redirect_to_base">Redirect to Base URL if requested URL doesn't match it</label> | I.e. redirect from http://example.com/store/ to http://www.example.com/store/ |
-
You should have three options in that dropdown.. No, Yes (302 Found), and Yes (301 Moved Permanently). 301 should be the third option on the list.
-
Hi Neil,
Thanks for the superfast answer, appreciate it.
OK I switched that option from Yes to No. This fixed the temporary redirect problem. However, now both the www and non www versions are returning a 200 response (see http://www.ragepank.com/redirect-check/).
Is this an easy fix in Magento? I know in other systems such as Volusion we don't have access to htaccess. I'm guessing I can't do anything about this and I just have to worry about setting up the correct canonical?
Thanks
-
Hey Brad.. firstly, posting client URLs is fine as far as SEOmoz Q&A is concerned, however, it's entirely up to you in terms of client privacy.
Magento has a setting in the back-end for solving www/non-www canonicalisation (System > Configuration > Web > URL options). You'll see a setting for redirect type ("Auto-redirect to Base URL"), and obviously you'll want to ensure it's set to 301 rather than 302.
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
-
Too many 301 Redirects caused lower rankings :(
1. Ok so I code my eCommerce site myself first 2. Then switched to Shopify and re-direct all my URLs (terrible mistake) 3. Then Shopify didn't do in terms of seo, so I switched to BigCommerce and re-direct all my URLs (Yes I know but at least this platform is much better) I started getting 404 errors as you can imagine in webmaster tools after switching from Shopify and there were 504 of them. Why its too many because I realized that Shopfiy just creates so many urls for the same pages. One by one I re-direct them to their new destinations. As you can imagine my rankings dropped. As my site speed is now 5.5s at gmetrix. mobile 47 - desktop 80 on Google Site speed tool. Looking at the links now, some of the 404's does not make sense to redirect. How should I approach this? Should I remove some of them if they were not used on web anywhere, no sites linking to that page and let them die in time? OR Should I keep them all? I am giving some examples below, there are so many for each. Thank you all! /account/login/ /blog/?page=7 blog/tagged/recipe /blogs/news /blogs/news?page=6 /collections/all/category-name /collections/frontpage/category-name /collections/frontpage/products/product-name /collections/shop/category-name /collections/shop/products/product-name /product-name/ /pages/terms-privacy /pages/frontpage /products/product-name /shop/products/product-name
Intermediate & Advanced SEO | | mounayoga0 -
Wrong redirect used
Hi Folks,
Intermediate & Advanced SEO | | Patrick_556
I have a query & looking for some opinions. Our site migrated to https://
Somewhere along the line between the developer & hosting provided 302 redirect was implemented instead of the recommended 301 (the 301 rule was not being honured in the htaccess file.)
1 week passed, I noticed some of our key phrases disappear from the serps 😞 When investigated, I noticed this the incorrect redirect was implemented. The correct 301 redirect has now been implemented & functioning correctly. I have created a new https property in webmaster tools, Submitted the sitemap, Provided link in the robots.txt file to the https sitemap Canonical tags set to correct https. My gut feeling is that Google will take some time to realise the problem & take some time to update the search results we lost. Has anyone experienced this before or have any further thoughts on how to rectify asap.0 -
To Redirect or Not
I have a strange situation and looking for advice on how well a permanent redirect of url will work. I have an eCommerce site called twpstain.com. This site sells TWP Deck stain and the URL/Content is fully owned by me. We do not however own the TWP brand and have always operated with permission from the manufacturer as an Authorized dealer. Circumstance have come up where they now want to be in control of all URLS that have the name "TWP" in them. Not sure if they legally can do this but they can cut me off with product if I do not comply. My options are: 1. A permanent redirect of entire site to new URL that does not have the word "TWP" in the url. 2. Give them the URL but they are willing to have me use the URL as I have in the past. A contract for this would be drawn up to cover me for years to come and possibly offer compensation if they decide not to renew. My concerns are numerous but the question for the Moz community is to how well the 301 redirect will work and will I lose my rankings? I currently dominate the rankings for my site and I very concerned that there will be major loss of sales and traffic. Any help or opinions on this would be much appreciated.
Intermediate & Advanced SEO | | dogtopiamichigan0 -
For how long does Google honor a 302 redirect?
Greetings! I would love some recent experiences to support our experience which is +/- 1 year old on this question. Based on our experiences around a year ago, I believe that Google will only honor a 302 temporary redirect for a relatively short period - perhaps up to a month - and then it will begin treating the redirect as a 301 redirect and will remove the old page from the index. Have others seen this? Is there an update on what the max "safe" period to have a 302 in place could be? We have a domain that is soon to experience about 3 months of "downtime" with no content on it, but the content will be back after that time. Ideally we would 302 redirect the pages elsewhere just for that downtime period. However, I don't want to do a 302 redirect if there is a risk that the pages will lose all of their accumulated authority and indexing. Basically, is there any safe way to just put the domain on ice for a few months? Please share recent experience only. Thanks for your insights!
Intermediate & Advanced SEO | | g-s-m0 -
Should i redirect this page?
Hi I have the following 2 pages: http://www.over50choices.co.uk/Funeral-Planning.aspx http://www.over50choices.co.uk/Funeral-Planning/Funeral-Plans.aspx My dilema is that google sees the words "funeral planning" & "funeral plans" as the same thing, which might explain why the "funeral plan" page is not ranked v well. My issue is that the "funeral planning" page is at category level and introduces the wider subject of funeral planning, which isnt just funeral plans, so if i 301 my "funeral plan" page i will have no where to talk about funeral plans. My question is, Is the "funeral plan" page not ranked v well because of this or do i just need better optimisation of the funeral plan page so google is clear which is the key focus for each page? Thanks Ash
Intermediate & Advanced SEO | | AshShep10 -
Is this a Correct Time to Use 302 Redirects?
Hi Mozzers! We are going through a rebranding process, and as of this morning we have 3 domains, all with identical content. For example (not real domain names): www.fantastic.com
Intermediate & Advanced SEO | | Travis-W
www.fantasticfireworks.com
www.fireworks.com We are using 3 domains to ease the rebranding transition. We currently only want people to visit 'www.fantastic.com,' and if they visit the other 2 domains we want them redirected. Since we will be using these other domains eventually, should we use 302 redirects instead of 301s? The other domains are new and do not have any domain authority or sites linking in, so we do not need to worry about link juice. Does it really matter what type of redirect we use? Thanks!0 -
301 redirects.
Hi everyone, I am having some issues with an a few dynamic URLs that are not redirecting; Example: http://www.example.com/shop-online?page=shop.product_details&flypage=flypage_images.tpl&product_id=69164&category_id=303 I first tried to carry out a standard 301 which looked like this; Redirect 301 /longurlwith&category_id=303 http://www.example.com/new-url Which didn't work. After a little bit of research I added the following into the htaccess file; RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]RewriteRule ^/shop-online$(.*)$ http://www.example.com/shop-online$ [NE,L,R=301] Which caused the website to error 500 (Not cool). So now I am stumped. Any help would be really appreciated as I'm sure it's an easy fix but I can't quite my finger on it. Thanks in advance :).
Intermediate & Advanced SEO | | AduroLabs0 -
How to 301 redirect ASP.net URLS
I have a situation where a site that was ASP.net has been replaced with a WordPress site. I've performed a Open Site Explorer analysis and found that most of the old pages, ie www.i3bus.com/ProductCategorySummary.aspx?ProductCategoryId=63 are returning a HTTP Status = NO DATA ... when followed ends up at the 404 catch-all page. Can I code the standard 301 Redirects in the .htaccess file for these ASP URLs? If not, I'm open to suggestions.... Thanks Bill
Intermediate & Advanced SEO | | Marvo0