Icon search engine

I noticed that the correct branch has been selected but the source is not being updated , even after redeploy

 # Favicon Not Showing in Search Results for Next.js 14 App# Favicon Not Showing in Search Results for Next.js 14 App

## Problem Description
I have a favicon set up in my Next.js 14 app using the App Router, but it's not showing up when searching for my website. I've tried the following:

1. Added favicon in the `app` directory
2. Specified the favicon in the `metadata` object in `layout.tsx`
3. Placed a copy of the logo in `/public/icons/favicon.ico`

However, the icon still doesn't appear in search results.

## Current Code
Here's my current `layout.tsx` configuration:

```tsx
import type { Metadata } from "next";
import Script from 'next/script';
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import "./globals.css";
import { go3Font } from './fonts';

export const metadata: Metadata = {
  title: "Frisspits - Professionele Schoonmaakdiensten",
  description: "Frisspits: uw allround schoonmaakpartner in Friesland en omstreken.",
  icons: {
    icon: "/icons/favicon.ico",
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="nl" className={go3Font.variable}>
      <body className={`flex flex-col min-h-screen bg-background font-go3`}>
        <Header />
        <main className="flex-1">{children}</main>
        <Footer />
        <Script
          id="schema-org"
          type="application/ld+json"
          dangerouslySetInnerHTML={{
            __html: JSON.stringify({
              "@context": "https://schema.org",
              "@type": "LocalBusiness",
              "name": "Frisspits",
              "description": "Professionele schoonmaakdiensten voor bedrijven en woningen in Friesland en omstreken.",
              "url": "https://frisspits.nl",
            }),
          }}
        />
      </body>
    </html>
  );
}

Project Information

  • Deployment URL or Custom Domain: rr – Deployment Overview – Vercel

  • Environment: production

  • Project Framework: Next.js 14

  • Build Settings:

  • Framework Preset: Next.js

  • Node/Runtime Version: v20.17.0

  • Package Manager: npm

  • Relevant Packages: dont think so

Questions

  1. Is there anything wrong with my current favicon configuration?
  2. Are there any additional steps I should take to ensure the favicon appears in search results?
  3. Could this be related to search engine caching, and if so, how long might it take for changes to appear?

Any help or insights would be greatly appreciated. Thank you!

Hi, @pajer3!

Is there anything wrong with my current favicon configuration?

Your current favicon configuration in the layout.tsx file looks correct. Could you make sure the favicon file is actually located at /public/icons/favicon.ico?

Are there any additional steps I should take to ensure the favicon appears in search results?

Generate and add a sitemap.xml file to help search engines discover and index your pages. You can use a library like [next-sitemap](https://www.npmjs.com/package/next-sitemap) to generate this automatically.

You could add a robots.txt file in your public directory to ensure search engines can crawl your site properly:

 User-agent: *User-agent: *
Allow: /
Sitemap: https://frisspits.nl/sitemap.xml

Could this be related to search engine caching, and if so, how long might it take for changes to appear?

Yes, this could be related to search engine caching. Search engines like Google don’t update their cache immediately after changes are made to a website. The time it takes for changes to appear can vary, but it typically ranges from a few days to a few weeks.

Let us know how you get on!

The issue is that tcommits arent being read by vercel deployments in the new commits i have added the facicon in app dir but it runs from the old commits!

I think The issue has been resolved, i let you if i incounter more problems

2 Likes

Great to hear! Let us know if you have any more questions :slight_smile:

A view days later


i still havent seen the icon on google appearing :()
favicon exist in app dir , whats the problem?

I went on your website, and checked out the <head> It looks like there are two <link rel="icon"> tags:

  1. <link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="256x207">
  2. <link rel="icon" href="/icons/favicon.ico">

This is probably why it’s not rendering as /favicon.ico doesn’t exist. Can you delete that one in your code?

Cool il try it, after each commit deployment page seems not to pick up the new commits do i have to wait some time?

That seems to be a different problem (unrelated to your original post)

Worth reviewing the troubleshooting steps outlined in our guide:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.