# Disable frontend

**URL:** <https://forum.getkirby.com/t/disable-frontend/28911>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 28, 2023, 11:02am UTC](https://forum.getkirby.com/t/disable-frontend/28911 "2023-06-28T11:02:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobinBirr](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/robinbirr/32/796_2.png) [@RobinBirr](https://forum.getkirby.com/u/RobinBirr)\
**Post date:** [June 28, 2023, 11:02am UTC](https://forum.getkirby.com/t/disable-frontend/28911/1 "2023-06-28T11:02:56Z")

</div>

Hey guys,  
is there a way to deactivate the frontend (with URL always to the Panel)? I wanna use only the Panel for create, save and display Data.

Thanks for help

---

<div class="post-metadata">

**Author:** ![Adrieng](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/adrieng/32/14454_2.png) [@Adrieng](https://forum.getkirby.com/u/Adrieng)\
**Post date:** [June 28, 2023, 12:08pm UTC](https://forum.getkirby.com/t/disable-frontend/28911/2 "2023-06-28T12:08:36Z")

</div>

Hey Robin,

In `/site/config/config.php` (create the folder and the file if it doesn’t exist), you can add a route that lead to the panel in any case :

```auto
<?php

return [
  'routes' => [
    [
      'pattern' => '/(:all)',
      'action' => function () {
        go($site->panel()->url());
      }
    ]
  ]
];

```

More info concerning routing : [Routing | Kirby CMS](https://getkirby.com/docs/guide/routing)

---

<div class="post-metadata">

**Author:** ![Adrieng](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/adrieng/32/14454_2.png) [@Adrieng](https://forum.getkirby.com/u/Adrieng)\
**Post date:** [June 28, 2023, 1:04pm UTC](https://forum.getkirby.com/t/disable-frontend/28911/3 "2023-06-28T13:04:08Z")

</div>

Don’t forget to close the subject if the solution works.

---

<div class="post-metadata">

**Author:** ![mountbatt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mountbatt/32/8237_2.png) [@mountbatt](https://forum.getkirby.com/u/mountbatt)\
**Post date:** [January 11, 2024, 11:18pm UTC](https://forum.getkirby.com/t/disable-frontend/28911/4 "2024-01-11T23:18:18Z")

</div>

For me `site()` worked instead of `$site`.

`go()` could also be used to redirect to a external url like `go("https://www.myfallbacksite.com");`

```auto
<?php

return [
  'routes' => [
    [
      'pattern' => '/(:all)',
      'action' => function () {
        go(site()->panel()->url());
      }
    ]
  ]
];

```
