diff --git a/packages/gatsby/src/commands/develop.js b/packages/gatsby/src/commands/develop.js index 76aa60a08d341..69786ac445ee6 100644 --- a/packages/gatsby/src/commands/develop.js +++ b/packages/gatsby/src/commands/develop.js @@ -176,7 +176,7 @@ async function startServer(program) { // Render an HTML page and serve it. app.use((req, res, next) => { const parsedPath = parsePath(req.path) - if (parsedPath.extname === `` || parsedPath.extname.startsWith(`.html`)) { + if (parsedPath.extname === `` || parsedPath.extname.startsWith(`.html`) || parsedPath.path.endsWith(`/`)) { res.sendFile(directoryPath(`public/index.html`), err => { if (err) { res.status(500).end()