Custom 404 Page Support

We just recently added custom 404 page hosting. Here’s how you can set one up for your hosted site:

Link to support article

  1. Create a new page, and make sure the “URL” property is set to “404”:

  2. Then, you can design your 404 page just like any other page.

  3. Publish your site, navigate to a random page “/asdf” and you’ll see your custom 404 page instead of our default one.

Happy designing!

14 Likes

This is so awesome. Can’t wait to send someone to my 404!

1 Like

awesome webflow…great feature

Thanks for this feature! I asked about it a few weeks ago and appreciate the speedy update.

How can I make the 404 page just forward to my home page (instead of creating a page)?

True HTTP redirection support won’t come for awhile, but you can emulate this by creating a “404” page, then dropping this embed block in your page:

<script>
window.location = '/';
</script>
3 Likes

Will this work for exported sites hosted elsewhere?

Hi Chris,
This solution was just a temporary fix.

For exported sites this solution could work, but it is not recommended. You should use whatever redirection rules your web server supports.

Hey brryant, thanks for the reply. My question was in regards to the 404 page, but it looks like you’re referring to redirecting 404’s to the home page here. Or maybe I’m just misreading.

So, if I create a custom 404 page as described in this thread and export it to host elsewhere, will it work?

Sorry for what I’m sure is a basic question!

chris.

Hrm unfortunately doesn’t work that way - you’ll have to work with whatever webserver you’re using to set up a custom 404 page with redirect logic…

One of the many pains Webflow wants to alleviate =) Any reason why you don’t want us to host your site?

I’m already paying for hosting for my blog (and a few other sites) so it doesn’t seem to make sense to pay two different hosts. The day webflow has some blogging capabilities built in will be the day I make the switch!

1 Like

I haven’t done that. Please post that, thanks!

.htaccess

ErrorDocument 404 /path/to/404.html

Ahh yes, I have done this. Still having problems with a conflict between this and the code that removes the .html extensions though. Getting an error 500 instead of a 404. When I remove the “remove .html” code, my custom 404 page shows up if I go to a nonexistent page. Put that code back and I’m back to an error 500.

This is working for me, now. This allows my visitors to not have to use .html on my urls and supports my custom 404 page on an exported site.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html

ErrorDocument 404 /404.html

try this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html

ErrorDocument 404 /404

@brryant

You might want to note that webflows default 404 page is actually giving out a 403 error code instead of 404.

Ah! Yes I realized that awhile back but haven’t gotten around to fixing it. We’ll add it to our hit list. Thanks for bringing it up!

Just pushed a fix. Now 404 pages will return a proper 404 response:

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

Please create a new linked topic if you have further questions.