Just how can I apply that my links constantly start with www?
I intend to make certain that customers involve www.mydomain.com
also if they get here via the pen names mydomain.com
. This is to make sure that I have control over cookies on subdomains, therefore that Google sees one solitary domain name and also not a hodge-podge of URLs.
Just how can I do this with apache?
If you actually desire Google to make use of a details domain name design (with or without www ) after that create a free
Its that straightforward, and also you do not require to transform any kind of web server side code, additionally incoming relate to or without www will certainly be dealt with the very same raising the PageRank of your web pages.
Hyperlinks might indicate your website making use of both the www and also non - www variations of the URL (as an example, http://www.example.com and also http://example.com). The recommended domain name is the variation that you desire made use of for your website in the search results .
As soon as you inform us your recommended domain, we'll take your choice right into account when presenting the URLs. It might spend some time prior to you see this adjustment totally mirrored in our index.
If you do not define a recommended domain name, we might deal with the www and also non - www variations of the domain name as different referrals to divide web pages.
Enable mod_rewrite assistance after that create a.htaccess documents in the origin folder for you domain name with the adhering to web content :
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
</IfModule>
<VirtualHost ip:80>
ServerName domain.com
RedirectMatch permanent ^(.*)$ http://www.domain.com$1
</VirtualHost>
<VirtualHost ip:80>
ServerName www.domain.com
... usual config
</VirtualHost>
Related questions