I have spent 2 hours searching for .htaccess codes to make the www appear on my site urls within just the news.domain.com but I keep getting either 500 server errors, or it moves the url so it's like this www.domain.com/news/
Every link on my site already points at the www.news.~ versions.
There are 100s of pages on the subdomain, and a few folders too.
I have both versions listed in Google's webmaster tools and all the information on the site dashboard is exactly the same for both, but with the rich snippet tool to check authorship attributes, I get this message:
Warning: based on data collected from your profile, you contribute to www.news.domain.com while your website seems to be news.domain.com.
Oddly all my search results on Google are without the www.
I added the non www page to my contributor to links in Google+, but would like to solve this www or no www issue once and for all.
I can't use Google tools to specify with www because they say: Preferred domain is "Restricted to root level domains only"
I know the .htaccess code is something like this:
[codebox]
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^news\.iwantcollectibles\.com [NC]
RewriteRule ^(.*)$ http://www.news.iwantcollectibles.com/? [R=301,L]
[/codebox]
But the RewriteRule line is wrong. Any suggestions?
Thanks,
terry
Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
International SEM | Social Media | Search Friendly Design | SEO | Paid Search / PPC | Seminars | Forum Threads | Q&A | Copywriting | Keyword Research | Web Analytics / Conversions | Blogging | Dynamic Sites | Linking | SEO Services | Site Architecture | Search Engine Spam | Wrap-ups | Business Issues | HRA Questions | Online Courses
Force Www On News.domain.com So It's Www.news.domain.com
Started by
train99
, Dec 01 2011 01:23 AM
6 replies to this topic
#1
Posted 01 December 2011 - 01:23 AM
#2
Posted 01 December 2011 - 11:43 AM
Have you tried:
CODE
RewriteRule (.*) http://www.news.iwantcollectibles.com/$1 [R=301,L]
#3
Posted 01 December 2011 - 03:08 PM
Have you tried:
CODE
RewriteRule (.*) http://www.news.iwantcollectibles.com/$1 [R=301,L]
That results in: http://www.news.domain.com/news/antiques-dealer-habits.shtml when I ask for a page without the www. and loads a 404 error.
While I'm trying these codes, is there a way to delete the cache without closing the browser in firefox? That would remove a step in testing these.
#4
Posted 01 December 2011 - 04:19 PM
Is /news/ in the URL are you are trying - as in you are going to:
news.iwantcollectibles.com/news/antiques-dealer-habits.shtml
and it's redirecting to:
www.news.iwantcollectibles.com/news/antiques-dealer-habits.shtml
If not, and you are going to:
iwantcollectibles.com/antiques-dealer-habits.shtml
and it's redirecting to:
www.iwantcollectibles.com/news/antiques-dealer-habits.shtml
then the /news/ is getting picked up from somewhere else.
In that case, I would check the rest of the htaccess file for /news/.
Also, if you haven't already, you could try a server header checker ( www.seoconsultants.com/tools/check-server-headers-tool/ ) to make sure there isn't a second redirect going on.
Edit : Oh, and try holding Ctrl while pressing F5. That will usually skip the cache and refresh.
news.iwantcollectibles.com/news/antiques-dealer-habits.shtml
and it's redirecting to:
www.news.iwantcollectibles.com/news/antiques-dealer-habits.shtml
If not, and you are going to:
iwantcollectibles.com/antiques-dealer-habits.shtml
and it's redirecting to:
www.iwantcollectibles.com/news/antiques-dealer-habits.shtml
then the /news/ is getting picked up from somewhere else.
In that case, I would check the rest of the htaccess file for /news/.
Also, if you haven't already, you could try a server header checker ( www.seoconsultants.com/tools/check-server-headers-tool/ ) to make sure there isn't a second redirect going on.
Edit : Oh, and try holding Ctrl while pressing F5. That will usually skip the cache and refresh.
#5
Posted 02 December 2011 - 02:12 AM
the page is: www.news.iwantcollectibles.com/antiques-dealer-habits.shtml
There is no news after the .com
When I add the code above to the .htaccess and then load the page as news.iwantcollectibles.com/antiques-dealer-habits.shtml a subfolder called "news" is inserted into the url behind the .com
I tried deleting everything from the .htaccess file except the codes below and got the extra news behind the .com both times when I loaded pages without the www.
The server response is:
Which means nothing to me.
I found this on Google:
I take that to mean I could just add a line with the url of the page including the www to each page on the site. It would probably take me the smae amount of time to open each page and then pastethe line into the head and add the page name to the end of the string as I've already spent trying to do the .htaccess, but I think the .htaccess with a 301 code is better.
Thanks for the help.
There is no news after the .com
When I add the code above to the .htaccess and then load the page as news.iwantcollectibles.com/antiques-dealer-habits.shtml a subfolder called "news" is inserted into the url behind the .com
I tried deleting everything from the .htaccess file except the codes below and got the extra news behind the .com both times when I loaded pages without the www.
The server response is:
QUOTE
GET /antiques-dealer-habits.shtml HTTP/1.1
Connection: Keep-Alive
Keep-Alive: 300
Accept:*/*
Host: www.news.iwantcollectibles.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)
Server Response:
HTTP/1.1 200 OK Date: Fri, 02 Dec 2011 06:57:11 GMT Server: Apache/2 Accept-Ranges: bytes Vary: Accept-Encoding,User-Agent Content-Type: text/html
Connection: Keep-Alive
Keep-Alive: 300
Accept:*/*
Host: www.news.iwantcollectibles.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)
Server Response:
HTTP/1.1 200 OK Date: Fri, 02 Dec 2011 06:57:11 GMT Server: Apache/2 Accept-Ranges: bytes Vary: Accept-Encoding,User-Agent Content-Type: text/html
Which means nothing to me.
I found this on Google:
QUOTE
Can rel="canonical" be used to suggest a canonical URL on a completely different domain?
There are situations where it's not easily possible to set up redirects. This could be the case when you need to migrate to a new domain name using a web server that cannot create server-side redirects. In this case, you can use the rel="canonical" link element to specify the exact URL of the domain preferred for indexing. While the rel="canonical" link element is seen as a hint and not an absolute directive, we do try to follow it where possible.
There are situations where it's not easily possible to set up redirects. This could be the case when you need to migrate to a new domain name using a web server that cannot create server-side redirects. In this case, you can use the rel="canonical" link element to specify the exact URL of the domain preferred for indexing. While the rel="canonical" link element is seen as a hint and not an absolute directive, we do try to follow it where possible.
I take that to mean I could just add a line with the url of the page including the www to each page on the site. It would probably take me the smae amount of time to open each page and then pastethe line into the head and add the page name to the end of the string as I've already spent trying to do the .htaccess, but I think the .htaccess with a 301 code is better.
Thanks for the help.
#6
Posted 08 December 2011 - 09:44 AM
If the page is redirecting, there should be more output; there should be at least one "Server Response: 301 Moved ... " section.
I can't personally speak on the canonical, as I personally do not use it much - I use 301's instead, but it probably would be an option for you.
I can't personally speak on the canonical, as I personally do not use it much - I use 301's instead, but it probably would be an option for you.
#7
Posted 08 December 2011 - 03:29 PM
Thanks for your help. I never figured out the .htaccess codes.
I found on Matt Cutt's blog that Google will treat the rel=canonical reference like a 301 when it's clear.
I looked at my site and I almost always used the www so I used it in the canonical reference in the header. I was resisting the idea of going in and manually adding the code to my pages, but now that I've started I think it was a good choice.
I don't know if the canonical statements will help my rankings, but I'm also fixing up the title and description tags to make them more attractive. I'm also finding lots of articles that are either outdated, or are different subsets of the same topics.
So I'm cleaning the site up. I'm removing dated articles and putting 301 redirects to the newer content. I'm also combining similar articles to create one page, or setting articles on one topic up as a series using pagination tags in the headers.
For example I found 4 articles yesterday that target the same phrase. It's a high value phrase for me with over 95K searches a month. One of my pages is on the second page of search results, the others are much lower. My current traffic for the phrase is so low now it's not worth measuring. I found a fifth article that I'd never posted online. I spent 5 hours on those articles, but if I can get one of the pages on the first page of results, I'll see an improvement in revenue.
Based on the time I've spent so far I have at least 50 more hours of work to go. Some of the pages were written as far back as May, 2004. I know a lot more about my audience today so I'm certain the work will pay off.
Thanks again,
Terry
I found on Matt Cutt's blog that Google will treat the rel=canonical reference like a 301 when it's clear.
I looked at my site and I almost always used the www so I used it in the canonical reference in the header. I was resisting the idea of going in and manually adding the code to my pages, but now that I've started I think it was a good choice.
I don't know if the canonical statements will help my rankings, but I'm also fixing up the title and description tags to make them more attractive. I'm also finding lots of articles that are either outdated, or are different subsets of the same topics.
So I'm cleaning the site up. I'm removing dated articles and putting 301 redirects to the newer content. I'm also combining similar articles to create one page, or setting articles on one topic up as a series using pagination tags in the headers.
For example I found 4 articles yesterday that target the same phrase. It's a high value phrase for me with over 95K searches a month. One of my pages is on the second page of search results, the others are much lower. My current traffic for the phrase is so low now it's not worth measuring. I found a fifth article that I'd never posted online. I spent 5 hours on those articles, but if I can get one of the pages on the first page of results, I'll see an improvement in revenue.
Based on the time I've spent so far I have at least 50 more hours of work to go. Some of the pages were written as far back as May, 2004. I know a lot more about my audience today so I'm certain the work will pay off.
Thanks again,
Terry
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









