Skip to content

SSR content dependent on origin #11622

@zslabs

Description

@zslabs

Summary

Gatsby does an amazing job of SSR wherever possible, but with how my app works (currently all Node/Express) is I serve the root path different content based on where the origin domain is pointing; since I allow customers to map their "listings" to a custom domain; which points to the same server, and ultimately shows their content instead of the default marketing homepage I setup. Would Gatsby be able to handle these dynamic index pages, serve up the correct content, but at the same time -- still take advantage of SSR? I know I could hook up the componentWillMount() to an API call to grab the relevant content and then ultimately render either my marketing component or the listing, but since that'd be done client-side at that point, wouldn't my SEO suffer?

Environment (if relevant)

Node
Express
Nunjucks (current templating language)

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale?Issue that may be closed soon due to the original author not responding any more.type: question or discussionIssue discussing or asking a question about Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions