Laravel Forge can configure password protection on your sites using basic access authentication. You can choose whether to protect your entire site or a specific path.
To create a security rule, navigate to your site’s dashboard and click the “Network” tab. Then, click the “Add security rule” button. After providing a security rule name, path and a list of credentials click “Add security rule”.
To edit a security rule, navigate to your site’s dashboard and click the “Network” tab. Locate the security rule that you want to update, open the dropdown menu, click “Edit”.
To delete a security rule, navigate to your site’s dashboard and click the “Network” tab. Locate the security rule that you want to delete, open the dropdown menu, click “Delete”.
Laravel Forge creates a unique .htpasswd file for each security rule, meaning each secured path may have its own set of credentials. This also means that you will need to re-enter the same credentials when securing multiple paths. If you need to modify the credentials, you can find the .htpasswd file at /etc/nginx/forge-conf/.../server/.htpasswd-{ruleId} on your servers.
Laravel Forge does not store your security rule passwords on our servers.
Nginx allows you to add further access restrictions such as allowing and denying access to users by IP address. Laravel Forge does not provide the ability to configure this, but you are free to customize your own protected site configuration. Forge creates a /etc/nginx/forge-conf/.../server/protected_site-{ruleId}.conf configuration file for protected sites. You can read more about Nginx and basic access authentication in the Nginx documentation.
Laravel Forge allows you to configure redirects that can be configured to automatically redirect visitors from one page to another. These redirect rules can be created via the “Redirects” tab of the site’s management dashboard.
To create a redirect rule, navigate to your site’s dashboard and click the “Network” tab, and then into the “Redirects” sidebar. Then, click the “Add redirect rule” button. After providing a redirect rule name, path and a list of credentials click “Add redirect rule”.
Redirects are wrappers around Nginx’s rewrite rules and can use the full redirect syntax supported by Nginx, including regular expressions. For example, you could use ^/$ to only match the root of the domain.
To edit a redirect rule, navigate to your site’s dashboard and click the “Network” tab, and then into the “Redirects” sidebar. Locate the redirect rule that you want to update, open the dropdown menu, click “Edit”.
To delete a redirect rule, navigate to your site’s dashboard and click the “Network” tab, and then into the “Redirects” sidebar. Locate the redirect rule that you want to delete, open the dropdown menu, click “Delete”.
Although both of these redirect types are typically invisible to the user, the browser will treat them differently and it is important to know the difference.
When the browser encounters a temporary redirect, it will take you to the destination and forget that it was redirected from the original page. If you were to change the destination page and then visited the original page again, the browser would see the new redirect location and take you there.
With a permanent redirect, the browser will remember that it was redirected away from the original page. To save making another network request, the next time the browser visits the original page, it will see that it was redirected and immediately visit that page instead.Although you can change the destination of a permanent redirect, you will need to clear the browser cache before you visit the original page again. It’s considered bad practice to change a permanent redirect, so be careful when doing so.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Laravel Forge","colors":{"primary":"#18B69B","light":"#18B69B","dark":"#18B69B"},"logo":{"light":"https://mintcdn.com/forge-laravel/sHyXHYyrLoATu64X/logo/logo.svg?fit=max\u0026auto=format\u0026n=sHyXHYyrLoATu64X\u0026q=85\u0026s=469c693d945743b5870032ffac8d67b7","dark":"https://mintcdn.com/forge-laravel/sHyXHYyrLoATu64X/logo/logo.svg?fit=max\u0026auto=format\u0026n=sHyXHYyrLoATu64X\u0026q=85\u0026s=469c693d945743b5870032ffac8d67b7","href":"https://forge.laravel.com"},"favicon":"https://mintcdn.com/forge-laravel/DhXK7kFkCTo-2V2J/favicon.png?fit=max\u0026auto=format\u0026n=DhXK7kFkCTo-2V2J\u0026q=85\u0026s=eda7438a183a53fc59e814b80feebd59","api":{"playground":{"display":"simple"},"examples":{"languages":["php","bash","javascript","go"]}},"background":{"decoration":"windows"},"navbar":{"primary":{"type":"button","label":"Get started","href":"https://forge.laravel.com"}},"footer":{"socials":{"x":"https://x.com/laravel","github":"https://github.com/laravel","discord":"https://discord.com/invite/laravel","linkedin":"https://linkedin.com/company/laravel"}},"seo":{"metatags":{"canonical":"https://laravel.com/forge/docs"}},"fonts":{"heading":{"family":"Figtree"},"body":{"family":"Figtree"}},"integrations":{"fathom":{"siteId":"UZINDLYX"}},"contextual":{"options":["copy","chatgpt","claude","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/laravel"},{"anchor":"Blog","icon":"newspaper","href":"https://blog.laravel.com"},{"anchor":"Status","icon":"heart-pulse","href":"https://status.on-forge.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"forge-laravel","hasAudioNarration":false,"actualSubdomain":"forge-laravel","customDomains":["forge.laravel.com"],"gitSource":{"type":"github","owner":"laravel","repo":"forge-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae35736befa89197b16df06","collectionId":"706b0864-66ed-4e31-83ec-2dda6fe33b80","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae35736befa89197b16df06"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae35736befa89197b16df06","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Documentation","count":49},{"language":"default","tag":"Sites","count":11},{"language":"default","tag":"Resources","count":10},{"language":"default","tag":"Basics","count":9},{"language":"default","tag":"Servers","count":9},{"language":"default","tag":"Knowledge Base","count":7},{"language":"default","tag":"API Reference","count":5},{"language":"default","tag":"Introduction","count":5},{"language":"default","tag":"Troubleshooting","count":5},{"language":"default","tag":"Integrations","count":4}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* latin-ext */\n@font-face {\n font-family: 'Instrument Sans';\n font-style: normal;\n font-weight: 400 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/instrumentsans/v4/pxiTypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr0She1YmV.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Instrument Sans';\n font-style: normal;\n font-weight: 400 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/instrumentsans/v4/pxiTypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr0SZe1Q.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 300 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\nbody{font-family:\"Instrument Sans\";font-weight:400}h1,h2,h3,h4{letter-spacing:-.025rem!important}code,pre{font-family:'Geist Mono',ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace}.font-semibold,b,h1,h2,h3,h4,strong{font-weight:500!important}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500!important;color:rgb(var(--primary-light))!important}.codeblock-dark div:not(:last-child){color:#fafafa}"}],"page":{"pagePath":"sites/network","slug":"/sites/network","pageMetadata":{"title":"Network","description":"Learn how Laravel Forge can manage your site’s redirect and security rules.","href":"/sites/network"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how Laravel Forge can manage your site’s redirect and security rules.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Tip,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`introduction`,children:`Introduction`}),`\n`,_jsx(_components.p,{children:`Laravel Forge can manage your site’s redirect and security rules.`}),`\n`,_jsx(Heading,{level:`2`,id:`security-rules`,children:`Security rules`}),`\n`,_jsxs(_components.p,{children:[`Laravel Forge can configure password protection on your sites using `,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/Basic_access_authentication`,children:`basic access authentication`}),`. You can choose whether to protect your entire site or a specific path.`]}),`\n`,_jsx(Heading,{level:`3`,id:`managing-security-rules`,children:`Managing security rules`}),`\n`,_jsx(Heading,{level:`4`,id:`creating-security-rules`,children:`Creating security rules`}),`\n`,_jsx(_components.p,{children:`To create a security rule, navigate to your site’s dashboard and click the “Network” tab. Then, click the “Add security rule” button. After providing a security rule name, path and a list of credentials click “Add security rule”.`}),`\n`,_jsx(Heading,{level:`4`,id:`editing-security-rules`,children:`Editing security rules`}),`\n`,_jsx(_components.p,{children:`To edit a security rule, navigate to your site’s dashboard and click the “Network” tab. Locate the security rule that you want to update, open the dropdown menu, click “Edit”.`}),`\n`,_jsx(Heading,{level:`4`,id:`deleting-security-rules`,children:`Deleting security rules`}),`\n`,_jsx(_components.p,{children:`To delete a security rule, navigate to your site’s dashboard and click the “Network” tab. Locate the security rule that you want to delete, open the dropdown menu, click “Delete”.`}),`\n`,_jsx(Heading,{level:`3`,id:`credentials`,children:`Credentials`}),`\n`,_jsxs(_components.p,{children:[`Laravel Forge creates a unique `,_jsx(_components.code,{children:`.htpasswd`}),` file for each security rule, meaning each secured path may have its own set of credentials. This also means that you will need to re-enter the same credentials when securing multiple paths. If you need to modify the credentials, you can find the `,_jsx(_components.code,{children:`.htpasswd`}),` file at `,_jsx(_components.code,{children:`/etc/nginx/forge-conf/.../server/.htpasswd-{ruleId}`}),` on your servers.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Laravel Forge does not store your security rule passwords on our servers.`})}),`\n`,_jsx(Heading,{level:`3`,id:`customization`,children:`Customization`}),`\n`,_jsxs(_components.p,{children:[`Nginx allows you to add further access restrictions such as allowing and denying access to users by IP address. Laravel Forge does not provide the ability to configure this, but you are free to customize your own protected site configuration. Forge creates a `,_jsx(_components.code,{children:`/etc/nginx/forge-conf/.../server/protected_site-{ruleId}.conf`}),` configuration file for protected sites. You can read more about Nginx and basic access authentication `,_jsx(_components.a,{href:`https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/#`,children:`in the Nginx documentation`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`redirect-rules`,children:`Redirect rules`}),`\n`,_jsx(_components.p,{children:`Laravel Forge allows you to configure redirects that can be configured to automatically redirect visitors from one page to another. These redirect rules can be created via the “Redirects” tab of the site’s management dashboard.`}),`\n`,_jsx(Heading,{level:`3`,id:`managing-redirect-rules`,children:`Managing redirect rules`}),`\n`,_jsx(Heading,{level:`4`,id:`creating-redirect-rules`,children:`Creating redirect rules`}),`\n`,_jsx(_components.p,{children:`To create a redirect rule, navigate to your site’s dashboard and click the “Network” tab, and then into the “Redirects” sidebar. Then, click the “Add redirect rule” button. After providing a redirect rule name, path and a list of credentials click “Add redirect rule”.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Redirects are wrappers around Nginx’s `,_jsxs(_components.a,{href:`https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite`,children:[_jsx(_components.code,{children:`rewrite`}),` rules`]}),` and can use the full redirect syntax supported by Nginx, including regular expressions. For example, you could use `,_jsx(_components.code,{children:`^/$`}),` to only match the root of the domain.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`editing-redirect-rules`,children:`Editing redirect rules`}),`\n`,_jsx(_components.p,{children:`To edit a redirect rule, navigate to your site’s dashboard and click the “Network” tab, and then into the “Redirects” sidebar. Locate the redirect rule that you want to update, open the dropdown menu, click “Edit”.`}),`\n`,_jsx(Heading,{level:`4`,id:`deleting-redirect-rules`,children:`Deleting redirect rules`}),`\n`,_jsx(_components.p,{children:`To delete a redirect rule, navigate to your site’s dashboard and click the “Network” tab, and then into the “Redirects” sidebar. Locate the redirect rule that you want to delete, open the dropdown menu, click “Delete”.`}),`\n`,_jsx(Heading,{level:`3`,id:`temporary-vs-permanent-redirects`,children:`Temporary vs. permanent redirects`}),`\n`,_jsx(_components.p,{children:`Laravel Forge supports two types of redirects:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Permanent (HTTP Status Code 301)`}),`\n`,_jsx(_components.li,{children:`Temporary (HTTP Status Code 302)`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Although both of these redirect types are typically invisible to the user, the browser will treat them differently and it is important to know the difference.`}),`\n`,_jsx(Heading,{level:`4`,id:`temporary-redirects`,children:`Temporary redirects`}),`\n`,_jsx(_components.p,{children:`When the browser encounters a temporary redirect, it will take you to the destination and forget that it was redirected from the original page. If you were to change the destination page and then visited the original page again, the browser would see the new redirect location and take you there.`}),`\n`,_jsx(Heading,{level:`4`,id:`permanent-redirects`,children:`Permanent redirects`}),`\n`,_jsx(_components.p,{children:`With a permanent redirect, the browser will remember that it was redirected away from the original page. To save making another network request, the next time the browser visits the original page, it will see that it was redirected and immediately visit that page instead.`}),`\n`,_jsx(_components.p,{children:`Although you can change the destination of a permanent redirect, you will need to clear the browser cache before you visit the original page again. It’s considered bad practice to change a permanent redirect, so be careful when doing so.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Network","description":"Learn how Laravel Forge can manage your site’s redirect and security rules.","href":"/sites/network"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Introduction","slug":"introduction","depth":2,"children":[]},{"title":"Security rules","slug":"security-rules","depth":2,"children":[{"title":"Managing security rules","slug":"managing-security-rules","depth":3,"children":[]},{"title":"Creating security rules","slug":"creating-security-rules","depth":4,"children":[]},{"title":"Editing security rules","slug":"editing-security-rules","depth":4,"children":[]},{"title":"Deleting security rules","slug":"deleting-security-rules","depth":4,"children":[]},{"title":"Credentials","slug":"credentials","depth":3,"children":[]},{"title":"Customization","slug":"customization","depth":3,"children":[]}]},{"title":"Redirect rules","slug":"redirect-rules","depth":2,"children":[{"title":"Managing redirect rules","slug":"managing-redirect-rules","depth":3,"children":[]},{"title":"Creating redirect rules","slug":"creating-redirect-rules","depth":4,"children":[]},{"title":"Editing redirect rules","slug":"editing-redirect-rules","depth":4,"children":[]},{"title":"Deleting redirect rules","slug":"deleting-redirect-rules","depth":4,"children":[]},{"title":"Temporary vs. permanent redirects","slug":"temporary-vs-permanent-redirects","depth":3,"children":[]},{"title":"Temporary redirects","slug":"temporary-redirects","depth":4,"children":[]},{"title":"Permanent redirects","slug":"permanent-redirects","depth":4,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/forge-laravel/1bbd0658b78e8288/rudder.js","/docs/_mintlify/custom/forge-laravel/cf2463a5a064fd05/plain.js"],"subdomain":"forge-laravel","siteName":"Laravel Forge","title":"Network - Laravel Forge","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-22T19:25:17.533Z","originalFileLocation":"sites/network.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how Laravel Forge can manage your site’s redirect and security rules.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Laravel Forge\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Network - Laravel Forge\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how Laravel Forge can manage your site’s redirect and security rules.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Laravel Forge\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://laravel.com/forge/docs/sites/network\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://forge-laravel.mintlify.app/_mintlify/api/og/v2?division=Sites\u0026amp;title=Network\u0026amp;description=Learn+how+Laravel+Forge+can+manage+your+site%E2%80%99s+redirect+and+security+rules.\u0026amp;theme=1c0f39d14eacb1d14985e191\u0026amp;signature=ca4fcb1319b93c8b7af50b8dea632c85ff4e9f505f42ccea59065f6e839cdae9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Network - Laravel Forge\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how Laravel Forge can manage your site’s redirect and security rules.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://forge-laravel.mintlify.app/_mintlify/api/og/v2?division=Sites\u0026amp;title=Network\u0026amp;description=Learn+how+Laravel+Forge+can+manage+your+site%E2%80%99s+redirect+and+security+rules.\u0026amp;theme=1c0f39d14eacb1d14985e191\u0026amp;signature=ca4fcb1319b93c8b7af50b8dea632c85ff4e9f505f42ccea59065f6e839cdae9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/forge-laravel/c_1rQpFWehdE_YrP/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Laravel Forge\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#18B69B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://laravel.com/forge/docs/sites/network\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/sites/network.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://laravel.com/#organization\",\"name\":\"Laravel Forge\",\"url\":\"https://laravel.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/forge-laravel/sHyXHYyrLoATu64X/logo/logo.svg?fit=max\u0026auto=format\u0026n=sHyXHYyrLoATu64X\u0026q=85\u0026s=469c693d945743b5870032ffac8d67b7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://laravel.com/forge/docs#website\",\"name\":\"Laravel Forge\",\"url\":\"https://laravel.com/forge/docs\",\"publisher\":{\"@id\":\"https://laravel.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://laravel.com/forge/docs/sites/network#webpage\",\"url\":\"https://laravel.com/forge/docs/sites/network\",\"name\":\"Network\",\"description\":\"Learn how Laravel Forge can manage your site’s redirect and security rules.\",\"dateModified\":\"2026-01-22T19:25:17.533Z\",\"isPartOf\":{\"@id\":\"https://laravel.com/forge/docs#website\"},\"breadcrumb\":{\"@id\":\"https://laravel.com/forge/docs/sites/network#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://laravel.com/forge/docs/sites/network#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Sites\",\"item\":\"https://laravel.com/forge/docs/sites/the-basics\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Network\",\"item\":\"https://laravel.com/forge/docs/sites/network\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://laravel.com/forge/docs/sites/network#article\",\"headline\":\"Network\",\"name\":\"Network\",\"description\":\"Learn how Laravel Forge can manage your site’s redirect and security rules.\",\"url\":\"https://laravel.com/forge/docs/sites/network\",\"mainEntityOfPage\":{\"@id\":\"https://laravel.com/forge/docs/sites/network#webpage\"},\"dateModified\":\"2026-01-22T19:25:17.533Z\",\"publisher\":{\"@id\":\"https://laravel.com/#organization\"},\"isPartOf\":{\"@id\":\"https://laravel.com/forge/docs#website\"}}]}\u003c/script>","siteName":"Laravel Forge","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/laravel"},{"anchor":"Blog","icon":"newspaper","href":"https://blog.laravel.com"},{"anchor":"Status","icon":"heart-pulse","href":"https://status.on-forge.com"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Welcome to Laravel Forge","sidebarTitle":"Introduction","href":"/introduction"},{"title":"Laravel Forge CLI","href":"/cli"},{"title":"Laravel Forge SDK","href":"/sdk"}]},{"group":"Basics","pages":[{"title":"Organizations","href":"/organizations"},{"title":"Teams","href":"/teams"},{"title":"Server Providers","href":"/server-providers"},{"title":"Storage Providers","href":"/storage-providers"},{"title":"Source Control","href":"/source-control"},{"title":"SSH Keys","href":"/ssh"},{"title":"Recipes","href":"/recipes"},{"title":"Notifications","href":"/notifications"},{"title":"API","href":"/api"}]},{"group":"Servers","pages":[{"title":"Creating and Managing Servers","sidebarTitle":"Managing Servers","href":"/servers/the-basics"},{"title":"Server Types","href":"/servers/types"},{"title":"Laravel VPS","href":"/servers/laravel-vps"},{"title":"PHP","href":"/servers/php"},{"title":"Load Balancing","href":"/servers/load-balancing"},{"title":"Nginx Templates","href":"/servers/nginx-templates"},{"title":"Root Access / Security","sidebarTitle":"Security","href":"/servers/security"},{"title":"Monitoring","href":"/servers/monitoring"},{"title":"Real-Time Metrics","href":"/servers/real-time-metrics"}]},{"group":"Sites","pages":[{"title":"Creating and Managing Sites","sidebarTitle":"Managing Sites","href":"/sites/the-basics"},{"title":"Domains","href":"/sites/domains"},{"title":"Deployments","href":"/sites/deployments"},{"title":"Repository Access","href":"/sites/repository-access"},{"title":"Environment Variables","href":"/sites/environment-variables"},{"title":"Commands","href":"/sites/commands"},{"title":"Queues","description":"Manage Laravel queue workers.","href":"/sites/queues"},{"title":"Network","href":"/sites/network"},{"title":"User Isolation","sidebarTitle":"Isolation","description":"Learn how to isolate your sites on Laravel Forge.","href":"/sites/user-isolation"},{"title":"Laravel","href":"/sites/laravel"},{"title":"Logs","href":"/sites/logs"}]},{"group":"Resources","pages":[{"title":"Databases","href":"/resources/databases"},{"title":"Database Backups","href":"/resources/database-backups"},{"title":"Managed Databases","href":"/resources/managed-databases"},{"title":"Managed Cache","href":"/resources/managed-cache"},{"title":"Object Storage","sidebarTitle":"Object Storage","href":"/resources/object-storage"},{"title":"Caches","href":"/resources/caches"},{"title":"Background Processes","href":"/resources/background-processes"},{"title":"Scheduler","href":"/resources/scheduler"},{"title":"Network","href":"/resources/network"},{"title":"Packages","href":"/resources/packages"}]},{"group":"Integrations","pages":[{"title":"Envoyer","href":"/integrations/envoyer"},{"title":"Sentry","href":"/integrations/sentry"},{"title":"Aikido","href":"/integrations/aikido"},{"title":"OpenClaw","sidebarTitle":"OpenClaw","href":"/integrations/openclaw"}]},{"group":"Other","pages":[{"title":"Support","mode":"wide","href":"/support"},{"title":"Changelog","href":"/changelog"},{"title":"Report Abuse","sidebarTitle":"Abuse","href":"/abuse"}]}]},{"tab":"Knowledge Base","pages":[{"title":"Knowledge Base","href":"/knowledge-base/servers"}]},{"tab":"API Reference","icon":"square-terminal","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"title":"Network - Laravel Forge","buildId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","deploymentId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","dynamics":[],"chunks":[]}