Can access my site using www
-
Hello, when I try to access my website using www i would like it to redirect to non www but instead it shows a sal error message.
-
Yes, you can access your website using the prefix "www". The "www" is simply a subdomain that is conventionally used to identify web servers. It is not required by any technical standard, but it is a widely recognized convention.
In short, you can access your website with or without the "www" prefix. It is simply a matter of personal preference.
Here are the tutorials I have followed to set redirects with or without www.
Via cPanel: https://www.milesweb.co.uk/hosting-faqs/redirect-www-non-www-urls-htaccess-cpanel/
Via DirectAdmin: https://www.milesweb.co.uk/hosting-faqs/redirect-www-non-www-urls-htaccess-directadmin/
-
This is common and can sometimes be easy to fix. Sometimes as simple as the setting of some HTTP rewrite rules in the .htaccess file. You will need to secure your domain for the wildcard domain including www when issuing an SSL certificate.
If you are using WordPress there are add-ons such as Really Simple SSL to help you with this.
Example of Rewrite
RewriteEngine On # This will enable the Rewrite capabilities RewriteCond %{HTTPS} !=on # This checks to make sure the connection is not already HTTPS RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] # Replace domain with your domain. RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301] # Replace domain with your domain.
This .htaccess rule will redirect all visitors from the non-www to the www version of your website.
[https://www.hostinger.co.uk/tutorials/cpanel/how-to-redirect-non-www-urls-to-www](link url)
This is the most common way however if you use CPanel it might be slightly different you might need to set up a redirect.
If you use Cloudflare you can just use some page rules and use a forwarding URL with 301 permanently redirected to the non-www of the domain.
Since we can use both www and non-www make sure your DNS records are updated for both.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Moving site from www to non www and also hosting to vps what will be the effect?
Hi SEO gurus,
Intermediate & Advanced SEO | | SeoBlogs61
I am trying to move my site from shared hosting to VPS hosting and also moving from www to non www version.
What is the best possible way to avoid any issue and without losing the backlinks.
Is it good or bad to do? URL: https://buylikesservices.com/0 -
On site issues after Magento 2 launch
We did a new site launch on Feb 7th this year - www.vesternet.com It changed from Magento 1 to Magento 2. We had some launch issues around SEO but now we've solved most every crawler issue in Moz reporting - according to Moz we're in better shape on-site than ever. But our organic search is just dropping daily - we expected a drop after launch then back to normal, but over 2 months on something just isn't right. A good example, on Google UK for keyword 'home automation' we've always been about position 10, but now we're out the top 50... Forget about off site for now - what's wrong with our site itself to have caused this? Can anyone help with insights please as this is killing our sales
On-Page Optimization | | dbsmtec1 -
Optimising for multi sites selling same products
Hi Everyone I work for a company that sell aluminium joinery under 3 brands which are, ostensibly, competitors. With regards to optimising the websites, for keywords, should I be trying to optimise them for the same keywords, or should I use different keyword variations of each?
On-Page Optimization | | APLNZ110 -
Problem with getting a site to rank at all
We pushed this Word Press site live about a month ago www.primedraftarchitecture.com. Since then we've been adding regular content, blog posts 3 times a week with social posts on facebook, twitter, G+ and LinkedIn. We also submitted via Moz Local about 3 weeks ago. Yext about two weeks ago and have been adding about 5 listings to small local directories a week. Webmaster tools shows that the site map is valid and the pages of the site are getting indexed and it shows links from 7 sites, mostly directories. I'm just not seeing the site ranking for anything. We're getting zero organic traffic. I though we did a good job not over optimizing the pages. I'm just stymied trying to figure out what's wrong. Usually we push a site live and see at least some low rankings after just a couple of weeks. Can anyone see anything that looks bad or where we've gone wrong?
On-Page Optimization | | DonaldS0 -
Should I remove the Jetpack Plugin From A SIte
I dont know if anyone has any experience with the jetpack plugin, but personally I prefer yoast. My point is someones site I am looking at has both Yoast SEO plugin and also Jetpack for wordpress, should I just remove the jetpack as it seems to be a very heavy loading plugin.
On-Page Optimization | | propertyhunter0 -
Can I use the first sentence of my page content as a meta description tag as well?
I just want to copy my content on the page and use the first or as well the second sentence of the content self for my meta description tag. Is that OK? Or should the Meta description tag be different?
On-Page Optimization | | paulinap19830 -
Accessibility search
Hello there, One of the sites we do work for is a chain of care homes. We are in the process of adding a page reader so any visitors they have who are visually impaired will find it easier to access the info they need. We're doing this from a usability point of view more than anything (given their target audience), but while looking to see if there were any accessibility news sites /directories we could leverage for some links I came across mentions of the old Google Accessibility search. It seems to have been before my time as an SEO, so I wondered: is this still relevant, or has it just been assimilated into the regular algorithm (the only mentions I could find were very dated) if relevant and separate from the main search, are there many who use it what other things should we take into account when trying to optimise for this (assuming it's still relevant, of course) Cheers guys!
On-Page Optimization | | themegroup0