Lädt...

🔧 Help - Subdomain Routing on NextJS - Multi tenant


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

How do I isolate the subdomains and the main domain - for CMS setup
What's the best way to achieve this?

First-

  • I want localhost:3000 to be completely free
  • The landing page and all of its paths(pages) to be accessibe only at app.localhost:300
  • app.localhost:3000/login for login which redirects to the dashboard.localhost:3000
  • User dashboard at dashboard.localhost:3000
  • Admin dashboard at admin.localhost:3000 Each subdomain completely separated.

I have multiple subdomains, each subdomain is a separate website
how do I ensure that paths don't leak and the SEO is not affected either.

How do the big guys do it?

Like - Subdomain1.app.com/home and subsdomain2.app.com/home don't mix up, and they are completely isolated

I want to to the same with admin.app.com and app.app.com subdomains to contain respective dashboards.

I have tried tweaking middleware and rewrites but somehow, either all the subdomain paths are accessible on the main site, or I get 404

○ Compiling /middleware ...
 ✓ Compiled /middleware in 1290ms (197 modules)
{
  pathname: '/login',
  hostname: 'app.localhost',
  path: '/login',
  baseUrl: 'http://localhost:3000/login',
  nextUrl: 'http://localhost:3000/login'
}
Rewriting auth path to: /app/(auth)/login
(node:39596) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 ○ Compiling /_not-found ...
 ✓ Compiled /_not-found in 7.2s (611 modules)
 GET /login 404 in 7989ms

What's the best way to build a multi-tenant app with next js?

...

🕵️ Enjin: Lack of Tenant Scoping Enables Limited Cross-Tenant Data Querying and Mutation


📈 32.6 Punkte
🕵️ Sicherheitslücken

🔧 NextJS examples: 60 popular websites built with NextJS and headless CMS


📈 24.82 Punkte
🔧 Programmierung

🔧 What is NextJs?  Why Should You Use it in 2023?  NextJs Pros and Cons Guide


📈 24.82 Punkte
🔧 Programmierung

🔧 3 Exciting Improvements Between NextJS 14 And NextJS 13


📈 24.82 Punkte
🔧 Programmierung

🔧 Understanding Next.js Page Routing vs App Routing and SSR Changes in Next.js 14


📈 23.25 Punkte
🔧 Programmierung

🔧 Relative Vs Dynamic Routing in React – Different Routing Methods with Examples


📈 23.25 Punkte
🔧 Programmierung

🔧 Kotlin Routing - routing everything


📈 23.25 Punkte
🔧 Programmierung

📰 Advanced Routing: Homematic IP bekommt intelligentes Routing


📈 23.25 Punkte
📰 IT Nachrichten

📰 Open Routing: Facebook gibt interne Plattform für Backbone-Routing frei


📈 23.25 Punkte
📰 IT Nachrichten

📰 MANRS to help secure large hubs of the internet from common routing problems


📈 17.49 Punkte
📰 IT Security Nachrichten

🐧 Help with netstat routing table


📈 17.49 Punkte
🐧 Linux Tipps

🐧 Help with netstat routing table


📈 17.49 Punkte
🐧 Linux Tipps

📰 Internet Society Calls on IXPs to Help Solve Internet Routing Problems


📈 17.49 Punkte
📰 IT Security Nachrichten

🔧 Enable multifactor authentication for your tenant on Azure


📈 16.3 Punkte
🔧 Programmierung

🪟 Azure Dedicated Host provides virtual machines on single-tenant servers


📈 16.3 Punkte
🪟 Windows Tipps

📰 Cloud Hosting Architecture: Tenant Isolation


📈 16.3 Punkte
📰 IT Security Nachrichten

📰 Problem: Handelspartner als Globaler Administrator für Tenant im Microsoft 365 Portal


📈 16.3 Punkte
📰 IT Nachrichten

🔧 Step Toward Better Tenant Provisioning


📈 16.3 Punkte
🔧 Programmierung

📰 The Big Bang Theory - Staffel 11: Recap zu Episode 19 "The Tenant Disassociation"


📈 16.3 Punkte
📰 IT Nachrichten

📰 Microsoft Patches Azure Cross-Tenant Data Access Flaw


📈 16.3 Punkte
📰 IT Security Nachrichten

⚠️ Tenant Limited 1.0 SQL Injection


📈 16.3 Punkte
⚠️ PoC

📰 Wiz debuts PEACH tenant isolation framework for cloud applications


📈 16.3 Punkte
📰 IT Security Nachrichten

🕵️ AI-As-A-Service Providers Vulnerability Let Attackers Perform Cross-Tenant Attacks


📈 16.3 Punkte
🕵️ Hacking

📰 Exchange Online Tenant Outbound Email Limits startet im April 2025


📈 16.3 Punkte
📰 IT Nachrichten

🔧 GitLab Dedicated serves as single-tenant SaaS solution


📈 16.3 Punkte
🔧 Programmierung

📰 AI-as-a-Service Providers Vulnerable to PrivEsc and Cross-Tenant Attacks


📈 16.3 Punkte
📰 IT Security Nachrichten

📰 Exchange Online: Tenant Outbound E-Mail-Limits ab März 2025


📈 16.3 Punkte
📰 IT Nachrichten

matomo