-
I'm doing a project using Next.js version 13 with beta app directory. I'm hosting on Vercel. I installed next-intl package to make my project international, and I can use different domain names.
Same situation with sitemap.js file. What shall I do to provide different robots.txt and sitemap.xml for the different domain names? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's an interesting question! I think your best shot is to read the host from the incoming request: const host = headers().get('x-forwarded-host') || headers().get('host'); Hope this helps! |
Beta Was this translation helpful? Give feedback.
That's an interesting question! I think your best shot is to read the host from the incoming request:
Hope this helps!