Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
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 do I carry out a redirect? Is there a code I need to use?
How do I carry out a redirect? Is there a code I need to use? Thank you in advance.
On-Page Optimization | | laurentjb0 -
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 -
Linking to External Site In Nav Bar
Hi, we are a celebrity site but also own a separate sports site with its own URL. We have a link to that site in our Nav bar. Are we being penalized by having that link? thanks
On-Page Optimization | | Uinterview0 -
Can I use Same Keyword for Multi pages Title Tags?
Hello All, I am working on client website and currently they are targeting One Keywords for multi pages. As I have search with Allintitle: Search query and Google display around 37 pages of website which carry same keyword in "Title Tags". I have told to client to change the "Title Tags" but they want that keyword for all relevant pages. So I want to know is that harm in Search Engine Ranking? Note: They have not done the link building activities for multi pages with same Keyword, they are using only in "Title Tags" only
On-Page Optimization | | jemindesai0 -
Do you think using accordion text can hurt SEO?
I have a lot of text for my home page. My plan is to a J Query Plugin for accordion text. Does anyone think that this can hurt SEO efforts?
On-Page Optimization | | DTOSI1 -
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 -
Should I use my blog posts in a sub folder
Ok I did a search and didn't see an answer to this exact question. Most of them were about if a blog should be in a sub folder and not the blog posts themselves... so here it goes. I have a blog on my website the blog itself is in /blog/ but the blog posts themselves are situated in the root folder so it looks something like mydomain.com/cool-seo-blog-post/ Is there any reason I should change this and make it read mydomain.com/blog/cool-seo-blog-post/
On-Page Optimization | | jaybrn10 -
Www1 and www domain
hi, I have a client who has an e-commerce business. My client does not want to fill the pages with too much content and has set up a www1 version with the same domain-name as the www. The plan is to create a lot of content and push www1 in ranking and then sending users (via links) to the www for ordering. Although there will be no duplicate content published on www and www1 this seems like an odd strategy, especially since the www already has a good page rank, and I'm not sure about how engines view a www.domain.com and www1domain.com situation even with unique content in each. Any thoughts?
On-Page Optimization | | vibelingo0