.htaccess and www - non www
-
Recently I have taken over a website and I made a pretty colossal mistake. The site was properly constructed via .htaccess to a www domain. Typically I roll without it and I made a bad assumption that the .htaccess was not previously set correctly because there were hundreds of fundamental mistakes.
After a couple of days I noticed the mistake but some of our new (non www) have picked up some solid links etc. So now I feel that I am in a nightmare of creating redirects etc. So should I switch back to WWW or not? Does it matter at this point?
-
Thanks for the reply. There is no duplicate data. I am very confident about this and I have properly constructed 301's to the correct Canonical link. I should have laid the question out a bit better. I am clearly defined through and through to the NON-WWW address but most all of the inbound links are to the WWW link and have a 301 to them. It appears as if I am missing the link juice from the links.
-
either way is ok, but not both.
at least when you have 301 redirect, people that grab your url will always grab the same version of it -
Thanks guys. I was pretty sure that is what I had to do but it is always so helpful in a predicament to get expert opinions.
Thanks again!!
-
Barry said it all.
I recommend you 301-redirect all pages without "www." to the fully qualified URLs containing "www.".
You'll get 90% of the linkjuice of existing backlinks, so just go for it. -
You almost certainly want to define it one way or the other at some point.
Yes, you'll lose a little bit of power through the redirects once you've done them, but at least afterwards you can be sure all the links are going to point to the right place.
Are you better having 90+% to one or 50% to each is the question
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
-
Htaccess noob
Hi all, I discovered that a site I'm working on has some pages from their old site that are stil live and getting traffic. I would like to add redirects for them to the .htaccess file. Unfortunately, I have zero experience writing or editing .htaccess files. Here is the existing .htaccess file: BEGIN WPSuperCache END WPSuperCache BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
Technical SEO | | rich.owings
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule> END WordPress And here are a few sample lines that I need to add: Redirect 301 /files/John-Doe.html /staff/
Redirect 301 /files/Jane-Smith.html /staff/
Redirect 301 /files/contact.html /contact/ So my question is, should I place those lines immediately after Rewrite engine on, or just before the closing IfModule tag or...? There is no consistent pattern that would allow for a single rule or two. Oh, and I will backup the current .htaccess file first! Many thanks for any help anyone can offer.0 -
Which URL do I request Google News inclusion for: the http or the non-http?
In Google WMT/Search Console, I've marked the non-www. version of my site as the preferred. But I haven't run into a choice between http:// and non-http:// before. Should I choose the one listed at the top, which is the non-http (AND the non-www) version? Thanks! Unknown.png
Technical SEO | | christyrobinson1 -
Has anyone tested or knows whether it makes a difference to upload a disavow file to both www. and non-www. versions of your site in GWMT?
Although Google treats both as separate sites, I always assumed that uploading the disavow file to the canonical version of your site would solve the problem. Is this the case, or has anyone seen better results uploading to both versions?
Technical SEO | | CustardOnlineMarketing0 -
Bad SEO is being done to www.myproactivechiro.com
Since January of 2013 my site's rankings have tanked, I don't know who, or old SEO firm that I left is doing this. A lot of bad links are coming from Russia and are killing my rankings, I need help what do I do, do I just start a new domain? thanks Alec
Technical SEO | | akhlebo0 -
Capitals URLs to Non Capitals...
Hi, I am working on a website which has capital urls and non capital urls which will be generating duplicate content, and I know it is better to use all lower case. The problem is that the page authority is better for the capital versions and I was wondering will it negatively impact the SEO of we 301 redirect the uppercase urls to the lowercase counterparts? Thanks.
Technical SEO | | J_Sinclair0 -
Need Help writing 301 redirects in .htaccess file
SEOmoz tool shows me 2 errors for duplicate content pages (www.abc.com and www.abc.com/index.html). I believe, the solution to this is writing 301 redirects I need two 301 redirects 1. abc.com to www.abc.com 2. /index.html to / (which is www.abc.com/index.html to www.abc.com) The code that I currently have is ................................................... RewriteEngine On
Technical SEO | | WebsiteEditor
RewriteCond %{HTTP_HOST} ^abc.com
RewriteRule (.*) http://www.abc.com/$1 [R=301,L] Redirect 301 http://www.abc.com/index.html http://www.abc.com ...................................................... but this does not redirect /index.html to abc.com. What is wrong here? Please help.0 -
Redirecting blog.<mydomain>.com to www.<mydomain>.com\blog</mydomain></mydomain>
This is more of a technical question than pure SEO per se, but I am guessing that some folks here may have covered this and so I would appreciate any questions. I am moving from a WordPress.com-based blog (hosted on WordPress) to a WordPress installation on my own server (as suggested by folks in another thread here). As part of this I want to move from the format blog.<mydomain>.com to www.mydomain.com\blog. I have installed WordPress on my server and have imported posts from the hosted site to my own server. How should I manage the transition from first format to the second? I have a bunch of links on Facebook, etc that refer to URLs of the blog..com format so it's important that I redirect.</mydomain> I am running DotNetNuke/WordPress on my own IIS/ASP.Net servers. Thanks. Mark
Technical SEO | | MarkWill0 -
How do I redirect non-www to www in IIS?
There is a lot of talk about this all over this site (and other's), but just about every solution mentions using the .htaccess file, which is only a solution for Apache. My sites are in a shared windows environment, so that won't work for me. I have access to the IIS manager for the server, and have several page-level redirects in place. My issue is that I cannot find a clear and easy way to re-direct my root (domain.com) domain, to my preferred specific domain (www.domain.com). I found a few articles online relating to a URL re-write module for IIS, but am not sure if I will be able to install that on a shared web server. Is there another way to accomplish my goal of not having 2 indexable versions of my site? I have rel-canonical tags on every page, but would prefer a more trustworthy and established solution. Thanks for any help you can offer. -Dave
Technical SEO | | dschapira0