How to redirect www.example.com to example.com?

Hi everyone!

I have a web page on https://www.gashowiz.xyz and https://gashowiz.xyz. No matter what I type in, it always shows the same page.

I would like that users who type www.gashowiz.xyz in their browsers be redirected to gashowiz.xyz and that this address (without www) is the one visible in their browsers after redirect.

Is that something that can be done in Cloudflare DNS settings and how?
Thanks to everyone who answers. :slight_smile:

It looks like both of those hostnames are set up through Cloudflare :orange: already, so you need to create one page rule.

Match https://www.gashowiz.xyz/*
Forwarding URL (301 or 302) to https://gashowiz.xyz/$1

The $1 makes sure that if they have bookmarks or links to a path on www they will be redirected to the same path on non-www.

With :orange: on the www site, the Page Rule will catch requests to www and forward them to non-www.

Great! Works like a charm! :slight_smile: Thanks a zillion! :+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.