How do I go about changing a 302 redirect to a 301.
-
Hello Friends! Thanks for viewing my question. Ok,My question today is How do I go about redirecting a 302 link to a 301 link. I understand the benefits of doing this as far as link juice and how the Search Engines views the two Re-Directs. I am wanting to know where I would start to do this. Thank you in advance for any help or suggestions!
-
I was afraid it would be in the technical area instead of a magical button solving my problems. I'm not exactly sure how I am doing the redirect, however I do believe it is ASP so I will give it a try. Thanks for the Answer!
-
How are you doing your 302 redirect?
If it's htaccess, either just change 302 to 301
So if it looks like this - redirect 302 /oldpage http://example.com/page - just change the number
If it's applied by a rule add R=301
RewriteRule ^oldpage(.*)$ /page [L,R=301]
If it's php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://example.com/page");
exit();
?>if it's asp
<%
response.Status = "301 Moved Permanently"
response.addheader "location", "http://example.com/page"
response.end
%>Double check those though, end of the day here, getting tired
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
-
Client would like to 301 redirect the homepage to a category page
Hello MOZ Community!!! I would like your expert opinions on a scenario, please! My client is an ecommerce company, and currently has one of its category pages outranking its homepage for a few key phrases. The homepage, however, has a better conversion rate. So, the client is asking that we make the homepage the category URL, so http://www.theirsite.com/blue-clothes. The existing homepage URL - http://www.theirsite.com - would 301 REDIRECT to the category page - which would render the current version of the homepage. Therefore, there would be nothing, ZERO content, on the MAIN URL: http://www.theirsite.com Has anyone ever done this before? What are the pros and the cons of this practice? Here is my same client, for reference: https://moz.com/community/q/issue-with-category-ranking-on-page-1-vs-homepage-ranking-on-page-2
Intermediate & Advanced SEO | | accpar0 -
Tags: 301 Redirect, Rel Canonical, or Leave Them Alone?
The title is pretty self explanatory ... we have cornerstone pages ( such as a page for "Widget A") that rank for a certain keyword and then relevant articles that all link to that particular cornerstone page. Each of those articles has the same tag ("Widget A") to tie them together. If you click on that tag, it creates a list of all articles with that tag. We think that this may be siphoning off some of that keyword Google Juice from our Widget A cornerstone page. Our question is, should we 301 redirect that tag to point to the Widget A cornerstone page, use a rel canonical pointing to the Widget A cornerstone page, or just leave it alone like we are doing now? Our goal is to have the Widget A cornerstone page receive the most Google Juice possible and not be diminished by the tags. Note* - We don't want to stop Google from crawling the tags because some of our tags rank highly for other keywords. Also, we tried 301 redirecting the tags before and our ranking dropped significantly ... however, we made a lot of site changes at the same time so we are not sure if the drop in rank was due to redirecting the tags or the site changes. Help please ... thanks in advance 😉
Intermediate & Advanced SEO | | Humanovation0 -
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 -
Should You Use 301 Redirects When Switching To A Secure SSL Server?
Hi, our client has switched from a non-secure server to a secure (SSL) server.. but the non secure pages still exist, i.e. http://www.stainlesshandrailsystems.co.uk/balustrade-systems.html (non-secure)
Intermediate & Advanced SEO | | Webpresence
https://www.stainlesshandrailsystems.co.uk/balustrade-systems.html (secure) We assumed that we should 301 redirect the http pages to the new https pages using the following htaccess rule; RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] HOWEVER! both of the above pages show the same Page Authority (PA) and Pagerank (PR).. does this mean that they are being seen as the same page, do we really need to employ 301 redirects? Many thanks in advance, much appreciated. 🙂 Lee1 -
Interesting 302 redirect situation - could they be a good idea??
Just started with a new SEO client. The site is built on Sharepoint Server 2007 running Windows Server 2003 R2 on IIS 6.5 (I know, fun times for me). Being a standard crappy Windows setup, URLs and canonicalization is a huge issue: first and foremost, we get a 302 redirect from the root www.example.com to www.example.com/Pages/default.aspx Now standard SEO best practices dictate that we rewrite and redirect these pages so they're clean URLs. However that may or may not be possible in the current environment - so is the next best thing to change those to 301s so at least link authority is passed better between pages? Here's the tricky thing - the 302s seem to be preventing Google from indexing the /Pages/default.aspx part of the URL, but the primary URL is being indexed, with the page content accurately cached, etc. So, www.example.com 302 redirects to www.example.com/Pages/default.aspx but the indexed page in Google is www.example.com www.example.com/sample-page/ 302 redirects www.example.com/sample-page/Pages/default.aspx but the indexed page in Google is www.example.com/sample-page/ I know Matt Cutts has said that in this case Google will most likely index the shorter version of the URL, so I could leave it, but I just want to make sure that link authority is being appropriately consolidated. Perhaps a rel=canonical on each page of the source URL? i.e. the www.example.com/sample-page/ - however is rel=canonical to a 302 really acceptable? Same goes for sitemaps? I know they always say end-state URLs only, but as the source URLs are being indexed, I don't really want Google getting all the /Pages/default.aspx crap. Looking for thoughts/ideas/experiences in similar situations?
Intermediate & Advanced SEO | | OddDog0 -
301 - do i change old links once 301 is in place?
Hey all, I'm about to setup a 301 on a website that has pretty good SEO rankings and I have the ability to change all the old inbound links that point to the old site, to the new site - should I leave them pointing to the old site that has the 301 on it or change all the old inbound links to the new domain name? Which has better SEO value? Thanks for helping, Anthony
Intermediate & Advanced SEO | | Grenadi0 -
301 Redirect - How Long Until Recovery?
How long after one moves a page and sets up the 301s should the site take to regain its previous rankings? Context: i've ported a site to a new framework. Along the way, several high ranked pages needed to have new URLs setup, as well as the site moved from www.domain.com to simply domain.com. About 1 week after the change, the site's traffic went down 70% and has been there for about another 2 weeks. I suppose it could be something about the new framework that is causing problems though according to SEOMoz tools, the new framework is checking out pretty well. I assume the problem is reconciling all those old www inbound links with the new non-www location. It is all 301'd however ... so it should be working, but is not. So my questions are: 1. How long should it take Google to reconcile these changes and put us back to original SERP positions 2. is there something inherently problematic with switching from www to non-www?
Intermediate & Advanced SEO | | NealCabage0 -
Don't want to lose page rank, what's the best way to restructure a url other than a 301 redirect?
Currently in the process of redesigning a site. What i want to know, is what is the best way for me to restructure the url w/out it losing its value (page rank) other than a 301 redirect?
Intermediate & Advanced SEO | | marig0