Custom 404 Page Issue

  • 1 August 2018
  • 6 replies
  • 103 views

Hello all!

I’ve got a custom domain setup with Unbounce, and have created a custom 404 page to go along with it using the simple instructions (create a new landing page using the custom domain and using “/404/” as the subdirectory). This domain used to be an old website, and we are using Unbounce to host a single page “site” during the transition to a new site.

It works great when the URL ends with a subdirectory (ex. www.mydomain.com/something/whatever/). When the URL ends in a specific file (ex. www.mydomain.com/something/whatever/default.aspx), it doesn’t display the custom 404 page I built. Is there something we can do to make those URLs pointing to a specific file like the examples above also redirect to the custom 404 page?

Thanks for your help!


6 replies

Has this been addressed yet?

Userlevel 7
Badge +1

Hi @fsm_qing 👋

I brought this up to a few teams here, and officially since Unbounce doesn’t have specific page files (domain.com/page/page.aspx) the 404 doesn’t capture those.

That said, I’ll bring this up with the Product Management team today to see how this could potentially fit into our roadmap, but at this point it would qualify as a feature request. I’ll share what I hear back!

-Jess

Awesome - thank you!!

Userlevel 7
Badge +1

And I’m back!

I just brought this topic up in our meeting and we had a good discussion around it. Full disclosure, this is a bit of a niche feature request so we aren’t able to immediately dedicate resources to it. That said, I’m going to take some time to go through existing feature requests and if there are enough instances where this has come up, I’ll be able to make a case for it and pitch it to our product team.

In the meantime, if you’d be willing, it would help me a lot if you could go into a bit more detail about why this particular method of displaying a 404 page is preferred than what’s offered in our original documentation? That would help me a ton! Thanks so much!

-Jess

I might be missing something here, but couldn’t you use GTM to poll the url location and manually redirect to a desired 404 page? There would be an extra check needed to ensure that if the 404 page returns a 404 to not loop, but would simply be part of the trigger (i.e pageStatus == 404 & pagePath != “404”).

Thank you! 🙏🏽 (And thanks to @Josh_berry-jenkins , as well!)

In regards to GTM - that’s a good idea! We actually have another team focused on GA/GTM so I didn’t want to pull them in unless it was totally necessary, but I think this is a good workaround: Placing this “script” between the <head> tags of the 404/default lander pages, under the “Javascripts” tab, which will cause lightboxes to work on all paths:

<base href="https://online.indwes.edu/404/" />

You just have to be careful about including this script on any pages with lightboxes that are different from the lightboxes on the 404/default lander page (our 404 page redirects to the “default lander” with only the “base” sub-domain page).

Jess - in regard to your previous question, I followed the steps in that documentation (successfully!), but recently, discovered that while the /404 to /(default-lander) redirect works for a first-level sub-directory (e.g. www.example.com/404), it doesn’t work for any sub-directories beyond that (e.g. www.example.com/404/404/).

Since the page wasn’t redirecting, lightboxes were resulting in “The requested URL was not found on this server” error message.

Since then, I’ve implemented the <base> tag, which seems to have fixed the issue, but we’re still keeping an eye on it in the event of an anomaly.

Reply