Next.js Discord

Discord Forum

FavIcon not showing in search results

Unanswered
Netherland Dwarf posted this in #help-forum
Open in Discord
Netherland DwarfOP
My favicon is not showing in google search results, but it is on the website itself.

Do I need to include it in robots.txt/sitemap.xml?
I think it should already be correct:
import { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: "*",
        allow: "/",
        disallow: [],
      },
    ],
    sitemap: `https://s-nails.be/sitemap.xml`,
  };
}

import { MetadataRoute } from "next";

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  return [
    {
      url: `https://s-nails.be`,
      lastModified: new Date(),
    },
    {
      url: `https://s-nails.be/algemene-voorwaarden`,
      lastModified: new Date(),
    },
    {
      url: `https://s-nails.be/privacy`,
      lastModified: new Date(),
    },
  ];
}

0 Replies