: Is www redirection (301) essential or not? I am new to SEO, and I have a website like StackExchange. I found one thing remarkably about my site is that www redirection (301) is not active.
I am new to SEO, and I have a website like StackExchange. I found one thing remarkably about my site is that www redirection (301) is not active. Is it essential?
More posts by @Correia994
2 Comments
Sorted by latest first Latest Oldest Best
www is just a subdomain. A website owner will normally make the decision whether they want their domain to be domain.com or domain.com.
If your website resolves to both the no-www version and the www version of your domain, then these are essentially two different URL's that your website is on so potentially causing duplicate content which is best to avoid and URL canonicalisation being the process of selecting the best/original URL of this particular content.
On an Apache server, you can implement your www canonicalisation 301 redirects in the root .htaccess like below:
This one removes all www from URL's:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*)$ %1/ [R=301,L]
This one forces all www in URL's:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^decodinghinduism.in$
RewriteRule ^(.*)$ www.decodinghinduism.in/ [R=301]
If you have something to redirect, then yes, otherwise, it's not.
By that I mean, that just doing the no-www to www is important, but not essential. Plus most hosting places already do that for you.
In any case, it's a good practice to redirect the no-www to www or viceversa.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.