How to add SITEMAP and robots.txt to Next.js application (fast and easy!)

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 28

  • @yhr4052
    @yhr4052 3 роки тому +1

    Your explanation was pretty straightforward, kiitos my friend.
    Works with localisation as well with a "lang" param.

  • @aziaev
    @aziaev Рік тому

    I love finnish accent. Content was helpful!

  • @webncyber
    @webncyber Рік тому

    I guess this is for nextjs 13.3 and below? Because how can this generate the domain/sitemap.xml dynamically?

  • @tuRistst
    @tuRistst 2 роки тому

    This is very simple and much useful. Thx!

  • @renatahdo
    @renatahdo 3 роки тому

    This really helped me a lot! Thank you so much!

  • @maratfaizer
    @maratfaizer 2 роки тому

    thanks a lot! I tried to use next-sitemap, but the logic is confusing in there (imho). but you way is really elegant and clear. thank again)

  • @tutkodev
    @tutkodev 3 роки тому

    Great content ! Thanks

  • @nerf66770
    @nerf66770 3 роки тому +1

    great and straightforward explanation, thank you for that i found very useful. Btw i have question, do i need sitemap if i only build one single page? such us landing page web

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому +2

      Great to hear! I would add sitemap also in that case, at least crawlers then know that it is just one page

  • @kirso
    @kirso 3 роки тому

    Thanks for this - is it possible to actually fetch the MDX format of files? I tried the dynamic version on the github but it didn't work for me :(

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      In the dynamic version that's on github, I only fetched the slugs of posts and used them in the sitemap but I see no reason why you couldn't fetch other details too.

  • @pawankushwaha785
    @pawankushwaha785 3 роки тому +1

    hi ,nice video can you help for small task in nextjs

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      Thanks! Shoot me an email, you can find my contact info on tuomokankaanpaa.com :)

  • @kunheelim881
    @kunheelim881 3 роки тому

    Google doesn't accept the sitemap T.T

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      How are you validating it?

    • @kunheelim881
      @kunheelim881 3 роки тому

      @@TuomoKankaanpaa i don't know the reason but it doesn't work
      so i changed library to 'next-sitemap'

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      Ok, well good that you got it working one way or another!

  • @istoric7221
    @istoric7221 2 роки тому

    How to add SITEMAP and robots.txt to Next.js application (fast and easy!)