Redirect root domain to www
-
I've been having issues with my keyword rankings with MOZ and this is what David at M0Z asked me to do below. Does anyone have a solution to this? I'm not 100% sure what to do. Does it hurt ranking to have a domain at the root or not? Can I 301 redirect a whole site or do I have to do individual pages.
"Your campaign is looking for rankings for the www version of the campaign but the URL resolves as a root domain. This would explain the discrepancy. Since there is no re-direct between the two, you can have brickmarkers.com 301 re-direct to www.site.com which will prevent you from re-creating your campaign to track the root domain. Once the re-direct is in place it will take a while for Google to show the www version in the results in which your campaign rankings will be accurate."
Thanks
-
Hi Eric,
I'm glad I could help! Feel free to send me a PM if you need further help.
-
Anders,
That worked perfectly, thanks,
Eric
-
I do not use Apache that much unfortunately (prefer Nginx), but assuming you are using Apache, you'd probably want to add something like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^brickmarkers.com
RewriteRule (.*) http://www.brickmarkers.com/$1 [R=301,L] -
Thanks Anders,
Thank you for the info.
Is this the correct code I be using should use?
RewriteCond %{HTTP_HOST} !^www.seomoz.org [NC]
RewriteRule (.*) http://www.seomoz.org/$1 [L,R=301] -
Both yes and no. It doesn't directly hurt your ranking to use your root domain for web, but it can affect your rankings to use both www. and the root domain. Typically what most people do is to redirect either www. or the root domain to the other, with the most common being redirecting the root domain with a HTTP 301 to the www.
In your case, this means that everyone visiting brickmarkers.com would be redirected to www.brickmarkers.com. This is helpful from a SEO perspective, as the "link juice" will be passed from brickmarkers.com to www.brickmarkers.com, consolidating all of your ranking power to one domain, instead of splitting it up over two.
The problem described in the quotation you included is however that you are tracking rankings for www.brickmarkers.com, but that it may sometimes be brickmarkers.com that shows up in the serp, and therefore the tracking isn't working correctly (or that's at least how I interpret it).
You can redirect the entire domain, you don't need to redirect the entire site. You can use this page on MOZ to read more about the 301 redirect and how to implement it:
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
-
301 Redirects
Hello, All. Hopefully this will be an easy question for some of you. I have a (WordPress) site with the format of: http://www.site.com/folder-old/page-old/ I have since re-named both the parent and sub-folders to (example): http://www.site.com/folder-new/page-new/ Everything is working well EXCEPT I am also trying to redirect visitors from the old URL/structure to the new. I have a 301 redirect setup as the following: Redirect 301 /folder-old/page-old/ http://www.site.com/folder-new/page-new/ -- But it doesn't seem to be working. Not sure if this is something finicky with WordPress or if the redirect is incorrect. Thank you.
Technical SEO | | BrandBuilder0 -
Redirecting a Few URLS from One Domain to Another
Hello, I have two websites within a similar niche...some of the top organic traffic driving pages on Website B I'd like to redirect to a similar page on Website A. The reason is Website A is a bigger and better and is monetized much better as well. I only want to redirect a few of the main URLS on Website A and also only those that I have similar content on my main Website B. Is this process safe for SEO? What is the best way to go about this process. I am not really concerned with Website B and what happens to it's rankings, but in the meantime, I'd like to redirect the traffic from some of it's main organic traffic driving pages to my main website A and to it's similar pages. I am also concerned with making sure my main website A stays white hat and doesn't receive any negativity from these redirects. Thanks.
Technical SEO | | juicyresults0 -
Merging Domains
Hi, Everyone, My company is currently working with a client that has multiple websites and is interested in merging them into one. One is a primary corporate site, the other is a site for a single line of products. They obviously want to merge the product site into the corporate site. The interesting thing is that the product site outperforms the corporate site. It has the highest traffic, and it has far more links/linking domains, a higher domain authority (although only by two points), and much more social activity. However, their reasons for wanting to merge the two are completely valid - less management, URL would match print collateral, etc. They're asking our opinion on whether or not to move forward with the merger. I'm leaning toward no simply because of the fact that the site they want to merge is outperforming the other. I'm curious, though, to get some other opinions on this. Would a merger be worth the work in this case? Any advice would be appreciated. Thanks!
Technical SEO | | PapercutInteractive0 -
Redirects for new website
Hi Moz community,
Technical SEO | | JSimmons17
I'm a fairly new SEO Specialist with a brand new website. We initially had a very basic holding website until the fully functional website was completed. I have to do some redirects as we have both .html and .php files & we don't want to lose SEO value for specific pages (like the index, news, etc). I also want to redirect from a www url to a non-www url. I am trying to accomplish redirects with the following code: RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.mywebsite.com [NC]
RewriteRule (.*) http://mywebsite.com/$1 [R=301,L] RedirectMatch 301 /index.html (.*).(php|html) http://mywebsite.com/index.php RedirectMatch 301 /cupcakes-slideshow/glutenfree-slideshow.html (.*).(php|html) http://mywebsite.com/gluten-and-glutenfree.php RedirectMatch 301 /press.html (.*).(php|html) http://mywebsite.com/news-and-reviews.php Please let me know if I am on the right track. Thanks so much in advance!0 -
Redirects 301
Hello, I need to reedirect a URL of a page that I have in my site (http://digitaldiscovery.com.pt/servicos-de-marketing-digital/publicidade-online/) to a new URL with SEO porpuses. Whats the best way to this? I use Wordpress btw. Tks in advance! PP
Technical SEO | | PedroM0 -
Redirecting an Old Domain
One of my clients has a newish e-commerce website that was just redesigned. Part of this new marketing push is shutting down an old yahoo store. The problem is that this old store's domain has a 10 year old link in DMoz and is there fore in about 200 other directories. Is pointing that old domain at the new website going to be enough to keep all of that link juice flowing?
Technical SEO | | Simple_Machines0 -
I Need advice in redirecting domains
I have tow domains (destination/town - travel websites), www.gansbaai.com, and www.danger-point-peninsula.co.za. The one, gansbaai.com is an old domain I bought under which I will be launching a new website in a couple of months. danger-point-peninsula.co.za, is another domain I acquired also about gansbaai, the area. I will we using the domain gansbaai.cm, but want to get the best link juice out of danger-point-peninsula. How do I merge the domains?
Technical SEO | | DROIDSTERS0 -
Parked Domain blog directory not redirecting
My newly parked domain name, (our main website had to switch primary domains) is not redirecting properly and is causing our blog to be duplicate content. My 301 redirects work for everything else, but our parked domain /blog directory is not redirecting. I can type in both urls and then the blog appears on both sites. Not good. If I delete my blog .htaccess file, then it redirects fine. However, then our blog links are broken. So it has to do something with our .htaccess files. I do have a .htaccess file for our website, saying redirect everything to correct location, so i think this is interfering, but I cannot pinpoint it. this is the .htaccess file for the blog. BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
Technical SEO | | hfranz
RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]</ifmodule> END WordPress main sites .htaccess (i am trying to pinpoint the issue here) Options +Includes
AddType text/html .htm .html
AddHandler server-parsed .htm .html
Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?parkeddomain.com [NC,OR] RewriteCond %{HTTP_HOST} ^newdomain.com [NC] RewriteRule (.*) http://www.newdomain/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^?]*)? RewriteRule (.*) /$1? [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ http://www.newdomain.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index.htm RewriteRule ^(.*)index.htm$ http://www.newdomain/$1 [R=301,L] RedirectMatch 301 /index.php/(.*) /$1 Is there something obvious here, that does not look right?0