holo-logo
s

Mortgage test

Blogs
Table of contents

Thinking about buying a home? We've got you covered

Get expert advice today

getServerSideProps
It's more likely your site will be dynamic. In this case, we can leverage getServerSideProps to generate an XML sitemap on-demand.
We can create a new page inside the pages directory such as pages/sitemap.xml.js. The goal of this page will be to hit our API to get data that will allow us to know the URLs of our dynamic pages. We will then write an XML file as the response for /sitemap.xml
https://dev.to/aswanth_raveendranek_a2a/generate-dynamic-sitemap-in-next-js-27m9
https://akashrajpurohit.com/blog/how-i-automatically-generate-dynamic-sitemap-in-nextjs/ 

https://nextjs.org/learn-pages-router/seo/crawling-and-indexing/xml-sitemaps 

Thinking about buying a home? We've got you covered

Get expert advice today

Share this post
TwitterLinkedInFacebookWhatsApp

Related articles

Best Mortgage Banks in UAE 2026: Complete Comparison
22 Mins Read

Best Mortgage Banks in UAE 2026: Complete Comparison

Is Dubai Off Plan Still Worth It in 2026? Best Strategies for Investors
9 Mins Read

Is Dubai Off Plan Still Worth It in 2026? Best Strategies for Investors

How Mortgage Refinancing in Dubai Can Save You Thousands in 2026
12 Mins Read

How Mortgage Refinancing in Dubai Can Save You Thousands in 2026