--- title: forbidden.js description: API reference for the forbidden.js special file. related: links: - app/api-reference/functions/forbidden version: experimental --- The **forbidden** file is used to render UI when the [`forbidden`](/docs/app/api-reference/functions/forbidden) function is invoked during authentication. Along with allowing you to customize the UI, Next.js will return a `403` status code. ```tsx filename="app/forbidden.tsx" switcher import Link from 'next/link' export default function Forbidden() { return (
You are not authorized to access this resource.
Return HomeYou are not authorized to access this resource.
Return Home