0

Recently started my nextjs journey, so please have some patience ;)

I got two separate apps:

  • Shop
  • Blog

Currently I am hosting shop on the root of my netlify domain through github. I would like to host blog on this same domain. Shop should preferably be a sub-directory /shop and the blog should be placed as the domain root.

Is there a way to «pack» my github project differently to include both apps in the desired structure?

1 Answer 1

0

Subdirectories would interfere with NextJs's routing, so you would have to package the two apps together for that to work.

The usual solution to this is to use subdomains, ie shop.companyname.com, which can be set up to point to a different App in the Netlify Custom Domains settings.

Sign up to request clarification or add additional context in comments.

2 Comments

Will using subdomains have any negative impact on SEO over the use of subdirectories?
@Fjott You don't necessarily have to use a single app, nor use subdomains. The shop app could be served from /shop with a basePath setup, while the blog app would be served from the root. They wouldn't interfere with each other.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.