no www.

How to get rid of www. in front of the name of a domain/sub -domain? transformation www.domeniu.tld in domain.tld .

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.somnoros.stealthsettings.com$ [NC]
RewriteRule ^(.*)$ http://somnoros.stealthsettings.com/$1 [R=301,L]

Editing the file .htaccess from the webroot of the sub-domain “sleepy” , with the lines above, is the simplest example of Redirection of traffic FROM www. in subdomain , keeping the location of the access page, valid.

Example:

http://www.somnoros.stealth…ry/you want-a-pui/

http: //somnoros.steateh…ry/you want-a-pui/

And without www. you will still get a pui And in addition to that, traffic.

The same is true for the areas that have www. by default.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

The procedure is important for declaring the law name of a domain in search engines ( SEO ) and web browsers. A site that works simultaneously with the same content on two addresses, it is possible to get a PR ( Google Page Rank ) divided.

Example:

https://stealthsettings.com ( PR3 )

https://stealthsettings.com ( PR1 )

From what I noticed a domain without www. is indexed much faster. We give up www. ? ;-)

Passionate about technology, I write with pleasure on stealthsetts.com starting with 2006. I have a rich experience in operating systems: Macos, Windows and Linux, but also in programming languages ​​and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, Presashop).

Home Your source of IT tutorials, useful tips and news. no www.
Leave a Comment