TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Redirect www. URLs to non-www with Cloudflare

2 pointsby hbroadbent6 months ago

1 comment

alsetmusic6 months ago
I&#x27;ve been doing this with a rewrite rule in Apache for years on all websites that I run. They&#x27;re all personal pages that probably get less than one hit per year that isn&#x27;t me, except for one that hosts a work-credentials profile from when I was doing independent consulting.<p>I&#x27;ve since read that this is inefficient, but given how little traffic my novelty sites get, what does it matter.<p>&gt; 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 &gt; Templates &gt; Redirect from WWW to Root &gt; Create a Rule, and you should be all set!<p>Cool that CloudFlare built this into their templates. ^www is ugly.
评论 #42161997 未加载