Custom code & redirects

Two site-configuration tools in Settings: custom code and redirects.

Custom code

Inject your own HTML or JavaScript into your published site, in two slots:

  • End of <head> — analytics, meta tags, custom CSS, and verification tags.
  • End of <body> — scripts and tracking codes that should load last.

The Custom code panel with the head and body slots

Paste your snippet, hit Save, and it's included on every page the next time you publish.

Redirects

Map an old URL to a new one so existing links keep working.

  • Rules are matched by priority.
  • Redirects ship with your site as Next.js rewrites.

Plugins

Both custom code and redirects are also available to plugins through the SDK.