301 redirect
-
Guys
Another post by me in regard to a 301 redirect which follows on from this post here
http://www.seomoz.org/q/seomoz-crawl-test
To quickly summarise all i have done is change URL name and done a simple 301 to change name where respective urls form old go to the relevant new pages
Ok Now 14 weeks since we implemented our 301, Originally done In PHP everything looked text book but still 80% down on rankings PR has returned to inner pages Home page has not updated
After some advice from some of the members here i changed the 301 on the old domain name from PHP to Htaccess
This is the code i used on the old server is below
RewriteEngine on RewriteRule ^(.*)$ http://www.newsite.co.uk/$1 [R=301,L]
On the new site the canonical is fixed by PHP , i want to change this to Htaccess, capturing the canonical element along with removing the trailing slash (This is only what has been done in the past so just keeping consistant)
This is the situation
Old site sits on a different server from the new so each have their own individual I.P addresses
I am convinced somewhere in the PHP application we are chaining so want Htaccess on old server to do the 301 and want htaccess on new server to deal with canonical elements and remove trailing slash (if that best practice)
What would be the best way to do this where we wont be chaining 301's
at present all looks perfect and doing what it should, but i know there is an issue and i believe it to be with the php script
Thanks for taking the time to look
Paul
Ps where i had the issue on the old site where Crawl test said page don't exist i now have on the new site if i try and crawl the non www. version of the new site , tested on a site that has the htaccess 301 in place and get the option of crawling the old or the new page so something don't stack up so its not the tool its the PHP
Fetch as Googlebot and every other tool reports the correct header responses
-
Hi Patrick
Thanks for responding
I still have no rankings 80% down, its 14 weeks since i implemented the 301 and some of the inner pages are ranking (Therese are a lot lower than when we did the 301) however the home page even if i copy a line of text wont bring up my site.
The original 301 went textbook style and everything looked perfect, but rankings did not follow and all we did was a straightforward name change
My developer insisted on doing this in PHP however most his functions and he states when i asked him for the code "The 301 on the new site is integrated into the application and has dependences on other functions, which in turn will have dependences on other functions, which would basically mean handing over a substantial amount of code. Potentially most of the application"
So basically on the outside i am 100% convinced that the 301 is chaining somewhere causing me a problem, so i am going to change both old and new sites for htaccess
I currently have this single line on the old site
RewriteEngine on RewriteRule ^(.*)$ http://www.newdomain.co.uk/$1 [R=301,L]
Originally tried the below but got an internal 500 error (ps any reason why that would give me a internal server error) as below would have been my preferred code
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]I think really what i need is the answer to is what do i put on the old site which is on server 1 is it just a single line 301
and on the new site which is dealing with the canonicals and removal of trailing slash
The original issue came when i changed URL name, and it was only the crawler that brought to light that i could not crawl the non www. version of my site (even though it is the www. version i wanted to crawl because the crawler should have gave a message that the site is 301 to the ww,
. version but it said page unavailable, however doing it on a colleagues site which had been correctly 301'd gave a message that the site had moved do you want to crawl the current or the new page ... so the crawl test will pick up on a 301 if implemented correctly
Hope that made sense
-
Hi Paul,
I've read this post and your initial post and I'm trying to figure out exactly what you are still having problems with. Is the issue that your rankings/traffic tanked after you implemented the 301 redirects from the non-www version of the site to the www version 3 months ago and you haven't seen any improvement since? Or are you just having issues with the SEOmoz site crawler? It really shouldn't matter if you use PHP or .htaccess for handling redirects since they are both on the server side, so there might be something else causing problems. I wouldn't worry about PR since it's natural for it to take awhile to move over to the new version of the page and plus PR by itself is not all that important anyways.
I'm willing to investigate further if you can provide some more details.
- Patrick
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
-
If I have set up my www as a cname, do I still need to add a redirect?
Hello, I am trying to minimize my redirect chains that have been popping up in my Moz crawl issues. So I'd like to get clear on some best practices. I have a few clients that are getting their first redesign in a while. We are moving into Wordpress from good ole .html files. So I've installed a redirection plug in to create 301 redirects for those .html versions of the pages. But apparently I am already redirecting from www to non-www. I have the www set up as a CNAME going to the IP address - is that counting as the redirection? Sometimes though, the www is set up by making it an A record. Is one way better than the other? Finally, I'm forcing https for all my new sites now. Is whatever the host does to "force" https also counting as a redirect and contributing to my chain? Any advice will be appreciated!
Moz Pro | | Dandelion0 -
Need Help with www and non-www redirect
Hi everyone, I've been looking around the forum and found some similar topics but none of them have solved my problem. Anyway, I'm new to SEO and found that when I use Open Site Explorer for the www version of my site I see the links directed to my page, but none of my twitter stats show up. When I do the same for my non-www version. I see my twitter stats, but no links. Facebook seems unchanged. Also, the Page Authority is much higher for the www (I assume because of the links) It is my understanding that it doesn't matter which version of the domain is used, I just need to pick one and stick with it (on Google Webmaster Tools, etc.). And that I also need to do a 301 redirect for the version that I'm not using. The issue now is that I have a 301 redirect, and when I type in my url in any version (http, https, www, non-www) it all redirects in the browser without issue. So i know users are getting to the right page, but the Open Site Explorer still sees them as 2 different sites. My concern is that if Open Site Explorer sees it this way then Google may see it this way as well and I could be missing out on potential rankings. I'm currently doing the redirect in the .htaccess file. The redirect looks like this: RewriteEngine On
Moz Pro | | opstart
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mydomain.com/$1 [R=301,L] Any Ideas on what I need to do to properly 301 redirect the site so that my preferred version can get credited with the links,twitter, and Page Authority stats? Also, I'm using wordpress and it has the URL set to the non-www version of the site. However, I think I would like to change this to the www version because most of the links are directing to www, and I also think people are more familiar with that format. Anyway, sorry for the long post. Any help would be greatly appreciated. Thanks.0 -
301 Redirects - But still duplicate content?
Our website domain website.com redirects to website.com/en (since it's in English). Therefore, all pages on website.com redirects to website.com/en. In my Moz analytics, it says I have duplicate content, and lists all of these pages. Didn't the 301 redirects take care of the duplicate content? Or do I still have to add canonical tags?
Moz Pro | | Taulia0 -
Fixing temporary redirects
Hi all, I recently had an issue whereby the Moz crawl was showing up thousands of instances of duplicate content. I solved (or so I thought) this issue on a Magento-based eCommerce website by enabling canonical URL tagging on product pages and category landing pages. This reduced the instances of duplicate content dramatically (by the thousands!) however it created a new issue of thousands of temporary redirects. All of the research I have done has suggested that I should be setting these as permanent redirects somehow, but I am not sure how to do this or how to resolve this issue. Any help will be greatly appreciated. Thanks very much. Josh
Moz Pro | | Mediademon0 -
SeoMoz reporting 301 redirects I can't find
So I'm trying to find a bunch of redirects that SeoMoz is reporting that were created by Wordpress but I can't seem to find. I'm finding a bunch of redirects FROM pages like this: www.mysite.com/wp-content/themes/mimbo/page-name.com redirecting to www.mysite.com/page-name.com Anybody have any idea how I can track down the offending page that has a link to that url. I took a look at my templates and content with the pages and can't seem to find anything that would create it.
Moz Pro | | brandco0 -
Bad code on Learn Seo Redirection info Page
Is it just me, or is the Redirection resource page missing the exclamation point (!) in this code. If so, this could really mess someone's site up if they copy and paste. http://www.seomoz.org/learn-seo/redirection http://screencast.com/t/n7lknZ32G9xF Redirecting Canonical Hostnames: The original developers at SEOmoz needed to redirect any requests that do not start with www.seomoz.org to make sure they included the www. They did this not only because it looks better, but to avoid common canonicalization errors. Redirect: http://seomoz.org/To: http://www.seomoz.org/ Redirect: http://mail.seomoz.org/To: http://www.seomoz.org Redirect: http://seomoz.org/somefile.phpTo: http://www.seomoz.org/somefile.php Solution: Add the following directive: RewriteCond %{HTTP_HOST} ^seomoz.org [NC]RewriteRule (.*) http://www.seomoz.org/$1 [L,R=301] Explanation: This directive tells apache to examine the host the visitor is accessing (in this case: seomoz.org), and if it does not equal www.seomoz.org redirect to www.seomoz.org. The exclamation point (!) in front of www.seomoz.org negates the comparison, saying “if the host IS NOT www.seomoz.org, then perform RewriteRule.” In our case RewriteRule redirects them to www.seomoz.org while preserving the exact file they were accessing in a back-reference. *emphasis added by me
Moz Pro | | squareplug0 -
Www, non www, 301 redirects, Google webmaster tools & SeomozPro
arg! Any help on this topic would be greatly appreciated! This is in regards to sheffieldfurniture .com In October of 2011 I had our host set up a redirect for our site so all non www requests would be redirected to the www version and it works great (so it seems at least) Recently I signed up for SEOMOZPRO and when I started trying to track my organic results for various keywords I realized that Google has my site indexed in the non www format. Is this a problem? I’ve read you can tell google what your preferred domain is in Google Webmaster Tools, is that what I should be doing? Are there any negatives to doing that? I’m just confused as to why Google hasn’t noticed or acknowledged the redirect in 4 months. It makes me wonder if something isn’t working properly? I have since added a second SEOMOZPRO campaign with the non www version but I’m worried about having historical tracking issues if I then tell google to use the www version…
Moz Pro | | SheffieldMarketing0 -
302 Redirects on Xcart Store
The crawl finished on the site easydecals.com and I'm getting over 4,000 warnings with 302 redirects with urls like this. /How-To-Install-A-Wall-Decal.html?xid_33e42=01f75b1ca2a53108d78f5c598ffd99e6 What can I do to remove or stop the spider from hitting those?
Moz Pro | | i1560