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
-
Setting up redirects from non wordpress
Hi, we are rebuilding our site which was built on WordPress. The old permalink structure was /%post_id%/%postname%/ The new site is a custom build (not Wordpress), however, we are using WordPress for blog posts. The URL structure is www.customewebsite/blog/ As the custom site is not WordPress, we do not know how to create a redirect to push the WordPress url /%post_id%/ to the /blog section of the new site. What we currently get is page not found. Can anyone help with the htaccess redirect code? Many thanks one and all.
Intermediate & Advanced SEO | | Taiger0 -
Persistent listings or 301 redirects better for SEO?
Imagine these 2 scenarios for an ecommerce listing. 1. A listing that only closes once stock runs out 2. A listing that relists every 7 days assuming stock has run out and doing a 301 redirect to the latest version of that listing (imagine it relists several times) You might ask why on earth we would have the 2nd scenario, but we are an auction site where some listings can't be bid on. In other words those Buy Now only listings are also part of the auction model - they close after 7 days. For me it is a no-brainer that scenario 1 is better for SEO, and I have my ideas on why this is better for SEO than the second scenario such as age, SERP CTR, link equity not being diluted by 301 redirects not changing every 7 days when the listing relists multiple times etc. I was wondering if someone could articulate better than I possibly could why scenario 1 is better for SEO, and why scenario 1 would rank better in the SERPS....would it? Many thanks! Cheers, Simon
Intermediate & Advanced SEO | | sichristie0 -
301 redirect to a temporary URL
Hi there, What would happen if I redirected a set of URLs to a temporary URL structure. And then a few weeks later redirected the original URLs and temporary URLs to the final permanent URLs? So for example:A -> B for a few weeks.
Intermediate & Advanced SEO | | sichristie
then: A->C and B->C where:
C is the final destination URL.
B is the temporary destination
A is the original URL. The reason we are doing this is the naming of the URLs and pages are different, and we wish to transition our customers carefully from old to new. I am looking for a pure technical response.
Would we lose link juice? Does Google care if we permanently redirect to a set of 'temporary' URLs, and then permanently redirect to a set of what we think are permanent URLs? Cheers, Simon0 -
Is it a problem to have too many 301 redirects within your site
my website is translated into 10+ languages, but our news articles are often only published in 1-2 languages. Currently, URLs are created in the unpublished news languages that then 301 redirect the user to main news page since the content doesnt exist in that language. Is this implementation okay or is there a preferred method we should be using so that we don't have a large number of pages on the site with redirects? Thanks!
Intermediate & Advanced SEO | | theLotter0 -
My site penalized after 301 Redirect or redesign?
Hi, I have a question regarding my site (http://www.pokeronlineitalia.com) that has, all of a sudden, lost rankings on several keywords; plus, Google Analytics and the plug-in Clicky installed on my site (the site is built on WordPress) claim that my site has no visitors/visits anymore. I would like to provide a little background of what has happened. Three weeks ago I asked my web hosting company to do a 301 redirect from http://pokeronlineitalia.com to http://www.pokeronlineitalia.com. At the same time I asked a web hosting company to to a redesign of the site. Strangely, the day after the new redesigned site went online Google Analytics and the Clicky plug-in showed that my site, from one day to the other, had no visitors/visits anymore (I had installed Google Analytics and Clicky before the 301 redirect). In addition, I noticed that I had lost positions on many keywords for which I used to rank on the second page. However, the PR of the site has remained intact and Google is indexing it without problems. Plus, I still rank high for a keyword. I tend to believe that because of this, my site was not penalized by mighty Google...but I'd like an SEO expert to tell me what he thinks about it. In particular, please answer this: has my site lost rankings because of the 301 redirect? Has my site been penalized because of the redesign? Is this only a temporary situation? Thank you very much for your help. Sal
Intermediate & Advanced SEO | | salvyy0 -
Does having many 302 redirects on a site hurt rankings?
I am working with an affiliate website which has many product listings but the "Buy Now" button on each product listing is an external link (affiliate link) to the appropriate product page on the actual website where the product can be bought. Each of these external links passes through an internal redirect, which is implemented as a 302. Consequently, when SEOmoz crawls that site, it gives me a warning that there are hundreds of 302 redirects on the site. Do you think this will hurt the site's potential to rank? Should I remove the redirects and leave them as direct links to the external site?
Intermediate & Advanced SEO | | AlexFusman0 -
Understanding Canocalization, domain structure, redirects
Hey guys, My background is more in marketing aspect of SEO and I'm afraid my technical knowledge is not where it should be. I'm confused about how to find out whether a site is splitting link juice by having to many domains(?) that are not redirected properly. Am I asking that right? How do you figure that out? And, once you know, do you just go to the ones that are not redirecting and add a 301? Where is the best place to add a 301? I know there's a difference in the eyes of the search engines between, say, example.com and www.example.com and probably other forms, correct? I'm not a programmer or IT specialist, I'm a marketing consultant, but I feel like I'm really missing it when it comes to understanding all this stuff (looking at HTTP headers, using GWT, reading source code, etc) and am not sure the best way to learn it effectively so I can be sure I'm not missing something when consulting with clients. Help? Please? Thanks, David
Intermediate & Advanced SEO | | DavidPPeters0 -
Redirect of just one internal page
If I have 2 domains with different content that are in same topic, and each one lives on its own IP-address, what could be the result if I do permanent redirect of just one internal page from one domain to counterpart page of another? What if I use rel=canonical instead of R301? Thank you!
Intermediate & Advanced SEO | | kolio_kolev0