301 Redirect Help please

Hey Guys,

Im new to cloudfare and not super techy so please assist as best as possible.

I have attached a screenshot of page rules.

Wanted to firstly check if it has been setup correctly and secondly if the visitor types the url without www or http instead of https with the site still redirect?

I would modify so it matches *yourdriving…blahblah.

This will match http and https, with and without www.

I see you put a wildcard (*) at the end. If you want to redirect the matching wildcard, put a $2 at the end of the new URL. Then your forwarder will send …leicester/newbies over to leicester/newbies in the new directory.

Each wildcard (*) counts as a $, so the one I told you to put at the beginning counts as $1, which you don’t need to use in the new URL, but the * at the end is $2, which you can put at the end of the new URL: …videos-leicester$2

As it is, anything in the old videos directory will be forwarded to just the new directory, and not the actual video page itself.

Thank you for your response.

Very kind of you.

Here’s an amended version it.

Does this seem okay? I have 6 301 redirects to do. Once ive mastered one, i can follow the same template

thanks again

I’m not sure why i added the wildcard at the end. TBH i don’t fully understand it uses :confused:

However, I think i understood what you said about putting it before *yourdriving…

Get rid of https:// before the *.

You also changed the forwarder over to www. It’s not going to break anything, but I hope that’s the proper URL.

The * at the end means if there’s anything after …leicester in the URL, then it will match those as well.

p.s. If you have six of these, I hope you’re on a paid plan or paid for more rules.
p.p.s. The ‘www’ subdomain isn’t going through your Cloudflare account, so you don’t even need a * at the front, so ‘www’ requests will never hit that rule.

1 Like

wow you really know your stuff. Give me a few minutes to get my head round what you just said :slight_smile:

after the URL if there was / with the leicester* cover it or should i do leicester/* ?

and yes on the PRO plan :slight_smile:

No / necessary if you’re using a *. It will match everything.

I think ive understood what you said and correctly implemented

Almost. You have only a * at the end (no slash), so that would match a /, but your forwarder also has a slash, so you’ll get a double slash. Get rid of the / before the $2 and it should be equivalent.

You’re literally having to hold my hand through it. i really appreciate your assistance.

Could I tip you or something - you’ve been so kind

That looks right.

No need to tip. We just like it when Cloudflare has happy customers.

1 Like

:slight_smile: Could I trouble you with one more please

Im sure i haven’t done this one quite right… I deleted the CNAME record but wanted to make a page rule

Keep that CNAME, but set it to :orange: Without an :orange: DNS record for that hostname, Cloudflare won’t respond to requests for that subdomain.

Other than that, that should do it. Cloudflare will intercept requests for the mobile site and send it to your main site.

Is this okay? And should i remove the page rule?

Don’t remove the page rule if you want your Mobile users to redirect to your main site. This CNAME will send your mobile users to that other domain. Just make sure to click on the :grey: to make it :orange: for the Page Rule to work.

Okay ive left the page rule and have the orange cloud.

sorry for be a pain - one last thing…my websites built on kajabi so is this okay?

Where your visitors end up doesn’t matter. Just as long as the hostnames you’re Matching to in the Page Rules are on Cloudflare.

On that front, some bad news. SSL (HTTPS) doesn’t seem to be configured. Do you have SSL/TLS set to Full (Strict) in the Cloudflare Dashboard?

Sorry for the late reply. I wasnt allowed to post anymore replies because Im a new remember.

My sites finally secure and fully-functional now :slight_smile:

However, the 301 directs didnt work. I removed the $1 and $2 and that seemed to do the trick. Not sure if that was the right thing to do?