I need help with htaccess redirect
-
Hi guys,
we have the domain cheats.co.uk, it has always displayed as cheats.co.uk without the www.
However it is now showing 2 version of the site, both the www. and the non www. version.
I know how to add to the htaccess folder to get the non www. version going to the www. version but i am worried about doing this because the non www. version has always been the one indexed in Google and has a page rank of 3.
Should i in fact be redirecting the www.version to the non www. version to keep page rank etc? or will page rank be passed over etc if i redirect to the www. version
I hope thats clear
Thanks guys
Jon
-
Any redirect causes an estimated 1 - 10% loss of link juice. If all your links use the non www version, then from a pure SEO link value perspective you should redirect the www version to the non www version of your URL.
If you are on good terms with the sites who are providing those links, you could also ask them to update their links to your new structure. It's a decision you will need to make.
Your htaccess code seems ok. Once again, that is not my area of expertise. I created the code I used with the Redirect app in cPanel and have copied it.
-
Hi Ryan,
Thanks for your answer. I believe that it was the non www version which has been used since existence and this has a page rank 3, i do think it looks better in the serps with the www.version though. From your experience the page rank and most of the link juice that is on the non www. version should transfer over to the www. version in time?
The redirect i was going to put on was
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] -
You can use the "www" or non-www form of your URLs. The important thing is to make a choice then stay consistent with your choice.
PageRank and links will be fine with either choice. Whenever you use a redirect you lose a small amount of link juice. All things being equal, determine which form of URL is most commonly used in your backlinks, then use that URL.
The method for a redirect depends on your hardware and software. The most common configuration for web servers is currently Apache servers with cPanel access. If you have this setup, you can use the Redirect application or ask your host to set the redirect up for you. I would not recommend making the change manually. One character out of place and your server will be instantly inaccessible.
With the above noted, below is code which can be added to your htaccess file to redirect non-www traffic to the www equivalent. I am not a htaccess expert and the code below you can use at your own risk. It works for me.
`RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]`
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
-
Multistore 302 Redirects
I noticed that every link on my site is being flagged up as a 302 temp redirect in Moz. The reason is because we have a multi store and use GeoIP to redirect anyone coming from their respective country. I'm guessing a 302 is the wrong way to do this - can anyone shed advice on the best practice for redirecting customers to geo-specific stores?
Intermediate & Advanced SEO | | moon-boots0 -
Breadcrumbs markup need to be fixed
Hi there, Google is up to mass spamming, the latest one refers o an Enhancements > Breadcrukbs report, the message is: "...Google systems show that your site is affected by 24 instances of Breadcrumbs markup issues. This means that your Breadcrumbs pages might not appear as rich results in Google Search. Search Console has created a new report just for this rich result type..." I've used their Structured Data Testing Tool, no errors were highlighted. Can anyone fathom out what they're referring to, please?
Intermediate & Advanced SEO | | jasongmcmahon0 -
Redirect 301 still works?
Hi, yesterday a friend said that 301 redirects does not transfer your page rank or domain autorithy anymore. I could'nt find anything in internet saying it, but I decided to ask you guys, since I think you are very reliable. so, 301 redirects wroks for transfer page rank, and i can create better domains and transfer everything, or this strategy is gone forever now?
Intermediate & Advanced SEO | | chablau0 -
IP Canonicalization - Is this needed?
Hi Wondering if we need to worry about IP Canonicalization via htaccess and if this is really required? and does would it have a big impact?
Intermediate & Advanced SEO | | Cocoonfxmedia0 -
301 Redirect to a new domain, Need linkbuilding ideas
Hi, I just 301 redirected my 3 year old domain to a new domain which was created yesterday. Now i want to start link building to my new domain. Should i start slowly by publishing 4-5 articles on article directories and a 1 press release a week? Can someone suggest me some ideas on how to handle a new domain. Will be waiting for replies.
Intermediate & Advanced SEO | | Dex3783783780 -
Automatic redirect to external urls
Hi, there is a way to create a "bridge page" with automatic url redirect ( 302 ) without google penalization? In this moment, my bridge pages are indexed on google with title and description of the redirected page.. Thanks in advance. Mauro.
Intermediate & Advanced SEO | | raulo790 -
I need some blogging advice please!
My name is Matthew and I am a new PRO member and founder of my own Internet marketing company in KS. So far I love the interaction and tools and functionality of seomoz. I am a true student of seo and love the subject. My dilemma is I know a blog is an important piece of any good seo campaign but I know very little about HOW to blog well......this is my new site and blog page. I only have a couple articles so far but many more planned. http://sawwebmarketing.com/seo-blog/ When I read an article that would be particuarly beneficial for my visitors can i post or share that on MY blog (giving the author the credit of course) without google thinking its duplicate content? is there anything specific I need to do with my blog for google to "see" the new, fresh content that is being added to the site? I have seen "tagged" items at the bottom of some blogs. Is this important? Some blogs will have a word or string of 2-3 words that are a link to a specific website. Does this help me or just them or just people reading the blog? **All I know is articles I write need to be relevant to my site and interesting and ORIGINAL and of benefit to my site visitors. ** Any advice that would help insure my blog articles get me all the juice they can would be GREATLY appreciated! Thank you in advance! Matthew ps - my site only went live a couple days ago so I am still working on a few onpage items but ANY feedback about the site itself would be spectacular! Have a GREAT weekend!
Intermediate & Advanced SEO | | Mrupp440 -
GeoIP - Redirect all but target country
My client would like to redirect all non UK traffic from their UK site to their main group site. I am intending to use a .htaccess redirect, like this: RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^GB$
Intermediate & Advanced SEO | | cottamg
RewriteRule ^(.*)$ http://www.group.com$1 [R,L] I have tested the redirect at it works fine. My question is if I put this in place would it have any negative SEO impact on the UK site?0