APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

www.yourdomain.com vs. yourdomain.com

Most likely "www.yourdomain.com" and "yourdomain.com" take you to exactly the same place. That's because (again, most likely) your Apache or IIS configuration is set to do just that. In Apache, it might look something like this:


 <VirtualHost 99.99.99.99:80>
         ServerName   yourdomain.com:80
         ServerAlias  www.yourdomain.com
 ..
 
 

Unfortunately, that can cause unexpected problems for you from search engines and ranking sites that are too lazy to notice that these really are the same site.

For example, Netcraft has a nice little anti-phishing toolbar that also happens to show relative site popularity. I'd been running that toolbar for about a month when I noticed something I thought was odd: the Netcraft ranking for my main site had suddenly dropped by 33%. How could that be? A minute ago I was in the 16,000 neighborhood and suddenly I was near 20,000 instead.

The answer was simple: I had gone to "www.aplawrence.com" rather than my usual lazy "aplawrence.com". Netcraft saw those as different sites, and ranked them differently.

Solving that was easy enough: I moved the "ServerAlias www.aplawrence.com" to the pcunix.com website, which does a 301 Redirect to aplawrence.com. Restarting Apache now redirects any "www" access to the unadorned site. Netcraft may still have statistics on the "www" site, but those will fade away over time and all access will be properly credited to one site.

See also 301 Redirects And Domains With And Without WWW



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> www.yourdomain.com vs. yourdomain.com




Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Tony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





If we define Futurism as an exploration beyond accepted limits, then the nature of limiting systems becomes the first object of exploration. (Frank Herbert)

An algorithm must be seen to be believed. (Donald Knuth)







This post tagged: