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 -
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 -
Keyword Cannibalization vs. Optimizing Site
I am in the process of optimizing our website and I am having a hard time reconciling two best practices I have found on Moz. 1. You should avoid having multiple pages focus on the same keyword because you will lose some control of which result will show. 2. You should identify your core keywords and weave these keywords multiple times (naturally) throughout your site. I have spent months identifying our top 7 keywords and am working through the site now. The first piece of advice keeps giving me pause. Can anyone weigh in with other considerations or advice on how I can reconcile these two strategies. Thank you
On-Page Optimization | | NikCall2 -
We use Bigcommerce and want to make changes to our mobile site
Our current mobile site does not show the banners we use on the desktop site. Can anyone tell us how we can change the mobile site to show these banners.
On-Page Optimization | | CostumeD0 -
Spanish version of site - best practice?
I need to create a Spanish version of an existing site. My idea was to have the Spanish content switch out the English content if the query string had something like ?l=es. It would also drop a cookie so that all other pages would switch out content as well. I do want the Spanish content to be indexed and rank in the search engines, though. I would include all of the Spanish versions (with the ?l=es) in the site map and link to them on every page with a link to the Spanish version. Does anyone have any experience with this? Is this a bad idea? Thanks! Tom
On-Page Optimization | | TomBristol0 -
Is there a guide to best practices for site content and blogs?
We have been working hard producing good content for our sites and now we need to know what are the most current best practices regarding placing and organizing content. We do the usual social media blast with Twitter, FB, G+ with each blog post. But it seems there is more that can and should be done. What about authorship and schema tags?
On-Page Optimization | | devonkrusich0 -
When Adding content to the site. Should I use the same keyword term on each page or select a secondary keyword to focus on?
I have created a site www.autoinsurancefremontca.com. The index page is SEO for the key term auto insurance fremont ca. I want to add more content on another page of this site. Should I have that page also SEO'd for the same keyword or should I pick another keyword to focus on?
On-Page Optimization | | Greenpeak0 -
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