Check out my course called Next Level Next.js! A full stack course covering GraphQL, TypeScript, Apollo, Prisma, auth and lots more! next.leighhalliday.com
@FarhanAhmed13602 жыл бұрын
working on localhost but getting internal server error 500 on production server
@RdozeTV2 жыл бұрын
This is the most clear tutorial straight to the point
@aleemehsan7613 жыл бұрын
May Allah Bless You with peace. You have solved a lot of my burden. Love from Pakistan
@leighhalliday3 жыл бұрын
Love from Canada!
@daveisdead3 жыл бұрын
I just wanna say how much your videos have helped me with nextjs. It’s a newer technology so there’s not a whole lot of help out there but I can always count on you for a lot of the answers. Thank you 🙏
@leighhalliday3 жыл бұрын
Thanks Dave!! Really happy that they are helpful!
@bigLoser8182 жыл бұрын
Thanks for breaking this down into smaller, bite-size bits. Very helpful. New subscriber.
@imsarvesh_3 жыл бұрын
This channel is absolutely fantastic
@ali_kazmi_2 жыл бұрын
Leigh Thank you so much. I needed to implement it the same way you did. It was a great help. These videos help a lot, maybe I should start making some as well.
@mohamedboufraine93682 жыл бұрын
Thank you very much for this content, it´s always useful to watch your videos on nextjs :)
@FarhanAhmed13602 жыл бұрын
Great video man
@tire2 жыл бұрын
this is what I exactly want. Thank you sir!
@israel5450 Жыл бұрын
This is very useful, but how do you approach this if all the application routes are within a dynamic parent directory; like [locale]?
@anthony_riera2 жыл бұрын
Thanks a lot for that, it was really helpful!
@76Freeman3 жыл бұрын
As always, great video and extremely useful. Thank you Leigh
@leighhalliday3 жыл бұрын
Thank you Helio!
@TheHimu302 жыл бұрын
Very well detailed tutorial I must say
@TechSignn2 жыл бұрын
How can i do the same thing but using npm instead of yarn ?
@exactzero3 жыл бұрын
Thanks! I've been looking for ways to solve this.
@leighhalliday3 жыл бұрын
Nice :D Me too, I just learned it last week for a personal project.
@chris_and_music3 жыл бұрын
Thanks a lot! Worked perfectly for me
@leighhalliday3 жыл бұрын
Excellent :)
@TheVGJournal Жыл бұрын
Hey Leigh! Do you know if I need to switch to getServerSideProps if I am using getStaticProps in order to take advantage of next-sitemap? It seems I get all my dynamic pages, but I may be overlooking it. Love all your content, thanks!
@azizee8 ай бұрын
hi, how do i manage the priority and lastmod? currently it show all with same priority and lastmod.
@SubhajitDas-m1e Жыл бұрын
i have multiple dynamic route how to do it
@Skillthrive3 жыл бұрын
So easy! I just moved my site to Next.js, so I'm looking forward to getting this installed.
@angelmcorrea17043 жыл бұрын
Thank you so much, very clear, to the point.
@miscany2 жыл бұрын
Great video man. I honestly don't really use typescript, but nice job.
@LuizFerK3 жыл бұрын
This content is amazing! Thank you so much for all that extremely useful information.
@leighhalliday3 жыл бұрын
Thank you! Glad you enjoyed it Luiz!
@tomek41322 жыл бұрын
Thanks. It helped a lot.
@leighhalliday2 жыл бұрын
Glad it helped!
@siumauricio26732 жыл бұрын
Your Goat!!
@kadyratamuradov86872 жыл бұрын
Thank you))
@GenLensOfficia3 жыл бұрын
Your video is helpful. But one problem when I deploy this in vercel then this server-side dynamic sitemap pages not working. It's showing me 500 internal Server Error. What is the problem here after deploy in vercel?
@uancamilo2 жыл бұрын
yes, I was going to comment the same! I'm facing the same issue as well.
@dylanpayne99542 жыл бұрын
Thank you!!!!!
@jaza76133 жыл бұрын
Awesome!
@TshepoShere3 жыл бұрын
So how do we handle multiple endpoints?
@leighhalliday3 жыл бұрын
You’ll have to do multiple fetch calls to get all your data
@TshepoShere3 жыл бұрын
@@leighhalliday Awesome, i get it
@hamed44513 жыл бұрын
whats happend for marketplaces with tones of products ? is this way good for them? i have to get all the products from the api , it takes lots of time , isnt it ?
@anthon9523 жыл бұрын
Hi thanks for the video... A question, My website has more than 200k of pages, and it takes long to generate the sitemap in the node server, any way to handle this?
@FarhanAhmed13602 жыл бұрын
working on localhost but getting internal server error 500 on production server
@niketchandivade33113 жыл бұрын
How can we create sitemap index file ?
@rafaelreale88483 жыл бұрын
and for pages that are generated after building it? Using fallback 'blocking' ?
@leighhalliday3 жыл бұрын
If you want them in your site map file you’ll have to take the dynamic approach and add them yourself.
@rafaelreale88483 жыл бұрын
@@leighhalliday In this case, do you say fetch all pages previously in the api? I have 6 million pages. I don't think I can do this.
@leighhalliday3 жыл бұрын
Hmm, That sounds like a lot to put into a site map haha. Does google support that many?
@youssefkanbour93082 жыл бұрын
Did you figure out how the approach to fetch the 6 million pages? I'm struggling with something similar, but its around 500 pages, but it still would take a long time for the backend to give me all the content
@zidanegimiga2 жыл бұрын
@@rafaelreale8848 I hope you solved your issue. Did mine by setting the siteMapSize according to the number of dynamic url options. It's avalable at the package's documentation.
@funnynews341 Жыл бұрын
i have done like that, but google search console said that's my site map get over 50.000 link. But i limit under 50.000, i don't know why?
@AbhishekSingh-ee2bo Жыл бұрын
I am in a situation where I am implementing the same way and I have an Nextjs Edge function powered by Vercel. The deployment is failing on Vercel and I do not have any solution for that till now Please do let me know if you find the solution.
@vivekknShots3 жыл бұрын
Does this dynamic aproch work r if a new id comes in api after build is made in vercel for ex: like stack overflow a new question is added so a new id is made in production so will sitemap be generated for the new question ?
@leighhalliday3 жыл бұрын
Yup! It should be calculated on the fly… unless you have caching turned on. You can try by visiting the page yourself in the browser and seeing what is in the XML file.
@LuizGustavo-wr7rm2 жыл бұрын
@@leighhalliday Hello. First, thanks for the tutorial. That doesn't work for me, I tried to implement in a blog and the sitemap file only update the links on build, any idea of can be happening? Thanks again!
@formsolutionАй бұрын
@@LuizGustavo-wr7rm Hi you found any solution for this ? if new id is added it will add in sitemap after build?
@TheBoglodite2 жыл бұрын
Is this compatible with Next-SEO?
@youssefkanbour93082 жыл бұрын
Hello Leigh, love the tutorial. Say that I want to have a sitemap for all the users in my database, but there are over 20,000 users and to fetch these 20,000 users, i have to receive them paginated, i.e: page 1 (first 500 users), page 2 (second 500 users), and so on, and i have to keep calling until there are no more pages left. when creating the users sitemap, do i first load all of the 20,000 users and then generate the sitemap, and next-sitemap takes care of it by splitting it into multiple files, or is there a way to load a given page X of users, and creating the sitemap specific for that page: i.e: users-sitemap/5 I'm just held back a bit by this approach, not sure what the google search engine prefers either. Thank you!
@leighhalliday2 жыл бұрын
Hey Youssef! I think you have to load all 20k user records into memory (even though that'll be done with multiple calls), and then the package will do the work of splitting them into multiple sitemap files. That said, I think a single Sitemap file can contain 50k records. I'd say just give it a try! My only worry is that it'll slow down your build/deploy considerably, so honestly at this size I would consider other approaches... maybe doing SSR with a week long cache.
@omarhosny93543 жыл бұрын
Great 👌 I need to deploy nextjs on custom server not on vercel i don't know what to do Any help would be appreciated
@GeniusHawlah2 жыл бұрын
Hi, did you find solution?
@jamestucker4800 Жыл бұрын
nginx reverse proxy it
@wanfahdiva48082 жыл бұрын
hi sir, i have a problem when i run yarn next-sitemap, the result of the public sitemap file becomes two, i.e. sitemap-0.xml and sitemap.xml.. is this okay for the future?
@skverskk2 жыл бұрын
To resolve this issue, add the following line to your next-sitemap-config.js file: generateIndexSitemap: false, Now when you run, npm run build, it will create just one xml file called sitemap.xml. The next-sitemap documentation is poor and this issue is never even brought up.
@mlnima2 жыл бұрын
I have like 100k post and for example in 1 month added like 50k, if I do like this the sitemap file get so big, any solution?
@ankitsinha51272 жыл бұрын
How can we implement in React js
@leighhalliday2 жыл бұрын
That's a complicated question Ankit... by React I am assuming you mean "create-react-app" or something outside of Next/Gatsby/Remix. And if that's the case, I am honestly not sure... you'll need some sort of custom build step or server-rendered page if you want it to be dynamic.
@ridl273 жыл бұрын
ty
@leighhalliday3 жыл бұрын
My pleasure, Alex!
@giorgieliozashvili6332 жыл бұрын
i'm getting 404
@Motivation-qj6id2 жыл бұрын
Typescript really turn me off lol .
@Maybehassanawad3 жыл бұрын
you gotta make a patreon account 😂
@leighhalliday3 жыл бұрын
Haha thanks Hassan. If you want to support you could either buy my course at next.leighhalliday.com or join the channel as a member :)
@Maybehassanawad3 жыл бұрын
@@leighhalliday happy to be a member :)
@satyamskillz3 жыл бұрын
Thanks, however I did it a few months ago, it was easy
@leighhalliday3 жыл бұрын
Nice! I did this for the first time just last week :)