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
-
How to handle SEO redirection after remove www
Recently our https://bestclassifiedsusa.com free classifieds USA website we move from www to non www format. Now old urls still showing in Google SERP. When click they show 404 error pages due to removed old ads.
Technical SEO | | bcuclassifieds
We redirect www to non www version for main domain but still old cache pages affected.
How to dynamically handle this case, all old www version ads pages auto redirect to relevant category pages?0 -
How can i check which inbound links to my site go to 404 pages?
I have external links coming into my site going to 404 pages, but i cant seem to find a way to search all broken links pointed at my website.
On-Page Optimization | | NickJPearse0 -
When does updating site content affect SERPS?
Can any of you shine a light as to when updating content on a website had any effect on its 'general' placement in the search engines? I appreciate that for an online newspaper, it must be important, but has anyone noticed from theirs or a client's site that by not uploading i.e. product descriptions or articles in general, that their site has taken a hit?
On-Page Optimization | | SDavis110 -
How do I reduce the amount of internal links on my site?
Hi, Can someone help me with reducing the amount of internal links on our site please? https://www.thepresentfinder.co.uk Thanks Charlie
On-Page Optimization | | The-Present-Finder0 -
URL Domain Used in Meta Description
Today I was asked if using a domain url in your meta description can have a negative impact on your website. This description includes a list of the homepage url, but directs visitors to a different internal page of the website. My concern fell with directing visitors to a different page of the site, but promoting the homepage in the description/snippet. With Penguin 2.1 release on the 4th, I'm very cautious of my links/urls. What are your thoughts behind this? What are the possible, if any negative impacts this could have on a site? This URL does have a brand name as so the Title.
On-Page Optimization | | flcity150 -
Duplicate content on area specific sites
I have created some websites for my company Dor-2-Dor and there is a main website where all of the information across the board is on (www.dor2dor.com) but I also have area specific sites which are for our franchisees who run certain areas around the country (www.swansea.dor2dor.com or www.oxford.dor2dor.com) The problem is that the content that is on a lot of the pages is the same on all of them for instance our faq's page, special offers etc. What is the best way to get these pages to rank well and not have the duplicate content issues and be ranked down by search engines? Any help will be greatly received.
On-Page Optimization | | D2DWeb0 -
Site wide internal links in footer
What is your take on site wide inernal links in the footer, e.g. for the most competitive keywords? Do you think those links are still useful or are those links of little value from your experience? It is an old school tactic but I still see many sites doing it.
On-Page Optimization | | Florakel0 -
Using commas in the title tag?
Is there a disadvantage/advantage to using commas to separate words in the title tag. Which will be more effective as a title tag: "keyword1 keyword2 - Brand" OR "keyword1, keyword2 - Brand"?
On-Page Optimization | | Audiohype0