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.
-
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 -
Should I Use A Code For Last Updated Blog Posts
Hi, I have a quick question about updating blog posts. When I add "Last Updated" to an updated post should this be in any particular type of code or simply just text, perhaps with the tag? Thanks An Advance
On-Page Optimization | | KNpaul0 -
Using a dash or underscores in file names.
Is it better to use a dash or an underscore in file names to improve SEO? EX memory_flash.jpg or memory-flash.jpg Or does it make no difference?
On-Page Optimization | | Robotnik0 -
Increasing pageviews on a social networking site
Our social networking site, Yookos, has a target of 25 million pageviews by yearend 2013. This is part of my responsibilities. As with all social platforms, user authentication is required before one can access the content. What can i do to improve the pageviews exponentially?
On-Page Optimization | | seoworx1231 -
Flickr v. On-Site Images
My apologies in that I have searched for this, have seen discussions on it and haven't seen a definitive answer on the question of hosting & displaying on-domain images v. using a source like flickr to host all of your images. I have a client that is mostly a local search play in a very tourism heavy area. I'm investigating this option for a few reasons. 1. Ease of use. The new flickr app is brilliant. So if he's out giving a tour, takes a picture, it can be seamlessly integrated to his account & then shot off to all of his portals (website, facebook, twitter, etc.). It's a small client & he's not tech savvy, so this option suits him very well. 2. SEO. With all of the tagging, geo components, and it playing nice with Google Images search, I thought this was a viable option in hosting the majority of his on-site images. I've seen opinions on this before. But I was wondering if there any further opinions on the subject. Not sure if there's anything 'definitive', but any help or insight would be appreciated.
On-Page Optimization | | BrianWhitaker0 -
What is this site all about?
Can anyone here tell me what this site is all about?... I really need to know, i have a blog.
On-Page Optimization | | Wales33030 -
Www vs "non" www site addresses and SEO
I first apologize for the lame question title - didn't really know how to word it... I'm having a bit of a conundrum and cannot figure out whats going on, but in the mean time I thought I would ask to see if its hurting my ranking. My site at www.ap-mg.com is built on WordPress using the Thesis them by DIY (just a little upfront info). I am very careful to make sure that all my links are in a particular format i.e. http://www.ap-mg.com - on my site, as well as other sites I have my profile on. My site also used to be hosted on the /home directory until about a month ago. My problem is that when I click on the DA MoxBar link while at my sites homepage, it takes me to Open Explorer, but to ap-mg.com and shows no results - I then add the www to the front of the address and vuala - results. But then the second issue I'm having is then it tells me that my site is redirecting the the /home directory, which its not and I'm still trying to figure that one out. So with all the craziness with my site, www, no www, /home....is this killing any chance of real ranking?
On-Page Optimization | | apmgsmith0