2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Next.jsのfaviconは app/favicon.ico に置くだけだった

2
Last updated at Posted at 2026-10-06

Next.jsでファビコンを設定する際、App Routerを使っている場合、基本はかなりシンプルです。

app/favicon.ico は自動で認識される

Next.jsのApp Routerには、ファビコンなどを扱うための特殊なメタデータファイルがあります。
プロジェクトを次のような構成にします。

app/
├── favicon.ico
├── layout.tsx
└── page.tsx

app/favicon.ico を配置すると、Next.jsがファビコンとして認識します。
Next.js側がメタデータとして扱ってくれるので、ファビコンのためだけに <head> を手動編集する必要はありません。

まとめ

ファビコン設定で「public? app? layout.tsx?」と迷いましたが、App Routerなら自動認識で手間が省けて簡単だなと思いました。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?