choose www or non-www
Closed this issue · 2 comments
Nice framework, I'll definitely look into it when I consider a redesign for my newsletter (and I'll be sure to promote this in a future issue)!
Just one thought...
For the primary domain, I notice you don't redirect the site for www vs. non-www.
You should pick one and redirect the other to the one you picked. I believe it's bad for SEO to not redirect. I suggest dropping the "www", as it looks cleaner and nicer with just "emailframe.work" in the address bar. Here's how to do this in htaccess, from HTML5 Boilerplate:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
</IfModule>
Thanks!
Hello Impressivewebs,
Thank you, glad your interested. Yes your right the domain does look much better with the www. dropped in the address bar. I have now added this to the website.
The code you provided did not work for me. Maybe because im not using HTML5 Boilerplate. I used the following code to display non-www.
#Force non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
Great, that's much better!
Yeah, the code will work depending on your host's apache setup. But glad you got it working. Thanks for letting me know, now I have to see if I can use your framework. :) Will definitely be promoting it, anyhow.