export async function getServerSideProps({ res }) { // Define the content of your robots.txt const robotsTxt = ` User-agent: * Allow: / Disallow: /ask-doctor/ Disallow: /ask-doctor/* Sitemap: https://healthmudraa.com/sitemap.xml `.trim(); // Trim any extra whitespace // Set the appropriate content type res.setHeader('Content-Type', 'text/plain'); res.write(robotsTxt); res.end(); // No need to return props, as we are directly sending the response return { props: {}, }; } // No need to export a default function if not rendering anything