Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Mulitple Pages - problem with the example on

Hi all,

I have try the example “Structuring a Multi-Page App” on this Page because I like a Structure :-).
I have structured the following Files:

When I start “” and open “” I get only a 404!

What is the Problem here?


Hi @Torsten,

Could you share with us your file, especially the callback having as input dcc.Location?

Here the

import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

from app import app
from apps import app1, app2

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),

@app.callback(Output('page-content', 'children'),
              Input('url', 'pathname'))
def display_page(pathname):
    if pathname == '/apps/app1':
        return app1.layout
    elif pathname == '/apps/app2':
        return app2.layout
        return '404'

if __name__ == '__main__':

Ok. When you open, the pathname is “/”, which is not handled in any of if statements, therefore it returns 404.

Without any changes in the app, you should be able to open for example. This is handled in the callback.

Usually it is a good idea to have an index page layout with links to the different apps with pathname == "/".

Ok, it works :slight_smile:
I will insert an index-page as Start-Page.

Thank’s a lot