SvelteKit page returns 405 on page, when other pages load fine

Hey folks - I’m checking how Google and Facebook are parsing metatags, but surprisingly, just one of my pages returns:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head>
<body><p>GET method not allowed</p></body>

For example:

Color Schemes & Palettes Gallery for Inspiration returns 405
Red Color Schemes & Palettes Gallery for Inspiration works fine

I’m using Facebook debugger to test changes

The content, data fetching, etc, is virtually identical. No redirects or any funny business. I’m using edge functions with a standard SvelteKit config. I’ve been trying for days but cannot get it work. Any help would be appreciated.

You can try disabling prerendering: Build & deploy | Site configuration | colorschemer | Netlify as it’s not needed for SvelteKit. However, I tried setting my browser’s User Agent to the one mentioned here: Webmasters - Sharing ( and your website still loads fine. I’m not sure why Facebook reports it’s getting that response, but that’s also not some HTML Netlify serves.

It turns out there was an empty server.js file, and that did not export the right methods! I figured it out just by luck - hope this can help someone later!

1 Like