# Dash multipage app does not work

**URL:** <https://community.plotly.com/t/dash-multipage-app-does-not-work/63571>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [April 29, 2022, 10:14pm UTC](https://community.plotly.com/t/dash-multipage-app-does-not-work/63571 "2022-04-29T22:14:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milan](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/milan/32/18754_2.png) [@Milan](https://community.plotly.com/u/Milan)\
**Post date:** [April 29, 2022, 10:14pm UTC](https://community.plotly.com/t/dash-multipage-app-does-not-work/63571/1 "2022-04-29T22:14:18Z")

</div>

Hi,

I am trying to replicate dash multipage app from documentation page [Multi-Page Apps and URL Support | Dash for Python Documentation | Plotly](https://dash.plotly.com/urls) but it does not work.

Sounds strange that app from tutorial does not work…

Please find git repo with my code [GitHub - milanzmitrovic/dash-multi-page-not-working](https://github.com/milanzmitrovic/dash-multi-page-not-working) .

I am confused, why it does not work?

I am using Dash 2.3.1 version.

Problem is present when app is organised in multiple files. On the other hand, when app is organised in one file, then it works perfectly. I can’t figure out what is issue with importing page layout…

Python 3.7.0

Thanks

---

<div class="post-metadata">

**Author:** ![AnnMarieW](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AnnMarieW](https://community.plotly.com/u/AnnMarieW)\
**Post date:** [April 30, 2022, 12:45am UTC](https://community.plotly.com/t/dash-multipage-app-does-not-work/63571/2 "2022-04-30T00:45:44Z")

</div>

Hi @Milan

The app is working - it starts by displaying “404” since there is no routing for a home page `"/"`.

You could add this to your callback in app.py:

```auto
elif pathname == '/':
        return page1.layout	

```

Another solution is to add some links to the `app.layout`

Note also that you have a typo in the `href` in `page2.py`

```auto
dcc.Link('Go to Page 1', href='/page2')

```

should be:

```auto
dcc.Link('Go to Page 1', href='/page1')

```

If you would like to check out a new, easier way to make multi-page apps, see this forum post: [📣 Introducing Dash `/pages` - A Dash 2.x Feature Preview](https://community.plotly.com/t/introducing-dash-pages-a-dash-2-x-feature-preview/57775/)  
and demo:  
[https://dashlabs.pythonanywhere.com/](https://dashlabs.pythonanywhere.com/)

---

<div class="post-metadata">

**Author:** ![Milan](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/milan/32/18754_2.png) [@Milan](https://community.plotly.com/u/Milan)\
**Post date:** [April 30, 2022, 7:56am UTC](https://community.plotly.com/t/dash-multipage-app-does-not-work/63571/3 "2022-04-30T07:56:33Z")

</div>

> [@AnnMarieW](#):
>
> [https://dashlabs.pythonanywhere.com/](https://dashlabs.pythonanywhere.com/)

Thank you @AnnMarieW . Link that you provided is excellent, I will definitely give it a try!

Btw, regarding my issue, it just started working after two hours. I do not know why and how, it was probably sth related with my Mac. Btw I was manually changing URL address in browser (in all pages were error 404), but it didn’t work.

Best,  
Milan M
