Cloudflare Pages Redirecting to Home Page with Query Parameters Simply Static Generation

First thing. I transferred my site to Cloudflare pages and all 404’s redirect to the home page. this isn’t ideal as I would like to redirect to a home page of my own but wasn’t worth fixing right away.

But, then I embeded a Huspot lead capture form on my static site on the contact page. The lead capture form has a redirect on submission to another page for someone to schedule an appointment.

This gets redirected to the home page though because of the attached querey parameters (I assume)

So a two part question.

  1. How do I either turn off the redirect of 404’s to the home page and setup a dedicated 404 page or
  2. How do I allow query parameters in a redirect so that the page isn’t redirected to the home page?

See attached screenshot for the name of the page with query parameters that got redirected to the home page

Include a 404.html in your site.

More info: Serving Pages · Cloudflare Pages docs

I’m using simply static on Wordpress then manually uploading the files.

I tried to search for a solution like that, but I was having trouble finding one because “Page Rules” kept coming up.

Is there a forum response or help doc that you know of that deals with my situation or similar so that I can direct my question there for a more detailed explanation?

I can google coding related things but I mostly use Wordpress with a page builder. I am using the simplest system possible to generate the files then upload them to pages. I am open to learning more but I don’t want to waste anyone’s time if there is another forum response with a full explanation (I have had people not give me full explanations on this forum before I assume because of how basic the questions were)

Any help would be appreciated

Yes, I have seen that doc and it doesn’t quite answer my question.

If I create a custom 404.html page then all 404 will redirect to that page and I won’t recieve a 404 when the page redirect has query parameters?

I also am not quite sure how I would create the page in html. Could I just take the html output of the wordpress 404 page created by the Simply Static plugin and rename it 404.html? I know it may sound really newb, but I don’t know where I upload the 404.html file.

SOLUTION: (For anyone who stumbles across this)

The appointment page with query parameters didn’t exist.

I figured out that Simply Static will not create a page that isn’t linked to from another page like in the header or footer. It was new information to me.

The Scheduling page didn’t even exist because it was not linked to from another page. A workaround was to link to the page in the footer, Run simply static to generate the page then save the folder for that page into a separate folder to be added back later. Then you can delete the link if you want to.

Each time that you generate your site, you can add the folder with any landing page that isn’t linked to from somewhere else back to the site manually.

The 404 page is generated the same way by creating a page in wordpress called 404 then linking to it. Then after you run simply static you can find the 404 page folder, duplicate the index.html file, rename it to 404.html then save that in the same spot as any other landing pages as mentioned above.

Each time you generate a new static site with simply static, you can then add the folder and the 404.html file into the root directory with the main index.html file in it.

Then when you get a 404 it will display your 404 page that you created in a page builder on Wordpress and any pages that are not linked to from the menu will also be added to the site.