I've been doing this with a rewrite rule in Apache for years on all websites that I run. They're all personal pages that probably get less than one hit per year that isn't me, except for one that hosts a work-credentials profile from when I was doing independent consulting.
I've since read that this is inefficient, but given how little traffic my novelty sites get, what does it matter.
> Note: As of Sept 5th, Cloudflare has a selection of Rules Templates you can pick directly from, including a “Redirect from WWW to Root” rule! This is probably exactly what you’re after — just go to Rules > Templates > Redirect from WWW to Root > Create a Rule, and you should be all set!
Cool that CloudFlare built this into their templates. ^www is ugly.
2 comments
[ 3.0 ms ] story [ 12.3 ms ] threadI've since read that this is inefficient, but given how little traffic my novelty sites get, what does it matter.
> Note: As of Sept 5th, Cloudflare has a selection of Rules Templates you can pick directly from, including a “Redirect from WWW to Root” rule! This is probably exactly what you’re after — just go to Rules > Templates > Redirect from WWW to Root > Create a Rule, and you should be all set!
Cool that CloudFlare built this into their templates. ^www is ugly.
Yeah there are definitely a few ways to go about this — adding a rule to your .htaccess has been a go-to for a looong time now!