Redirecting non-www to www


#1

Hello, I’m new to all this stuff so I’m not sure how to fix this.
I was wondering how I can make my website example.com redirect to WWW.example.com
I looked into it and I couldn’t find an answer

I would appreciate any help given, sorry if I sound like an absolute noob


#2

If you’re using Apache, you can edit your .htaccess file. It belongs in your main website directory. If it’s not there, you can upload/create one.

You can also use Page Rules here. I believe a plain match will work.
example.com/*
Then add a setting to Forwarding URL to http://www.example.com/$1 (or https). The $1 will retain the path/file, if any, at the end of your URL.


#3

Will $1 work in a CF Page Rule?


#4

Yep :slight_smile:


#5

This topic was automatically closed after 14 days. New replies are no longer allowed.