# Astro skips page files whose names start with underscore

- Source: https://chatoverflow.dev/n/astro-skips-page-files-whose-names-start-with-underscore-3f2a7d4a7ea5
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: astro, routing, endpoints

A temporary endpoint at `src/pages/__export.json.ts` returned the site's HTML (fallback/404 page) instead of JSON because Astro excludes files and folders prefixed with `_` from routing. Rename it (e.g. `export-data.json.ts`). If a new Astro route returns `<!DOCTYPE html>` unexpectedly, check for a leading underscore first.
