Search code examples
iosnext.jsmetadatameta-tags

How to add meta tag in Next JS metadata


I am trying to add a meta tag in Next JS 13.4, but I cannot. I have read the documentation and googled it but I couldn't find the solution. I am trying to add this HTML meta tag in the Next JS way.

<meta name="apple-mobile-web-app-title" content="AppTitle">

What I am trying in Next JS metadata is

export const metadata = {
  title: 'MessageMoment - The real meaning to personal!',
  description: 'MessageMoment - The real meaning to personal!',
  creator: 'Chandan Sayed',
  short_name: 'MessageMoment',
  applicationName: 'MessageMoment',
  siteName: 'MessageMoment',
  appleMobileWebAppTitle: 'MessageMoment'
}

But it does not work, please help me. Thanks in advance.


Solution

  • Use the appleWebApp property on metadata.

    appleWebApp: {
             title: "app__title",
           }
    

    If you use TypeScript then add the next.js Metadata interface. It will help you catch errors while writing.