Search code examples
reactjsnetlify

Change the Title and Description of a react application in production


When I created my application it was created by default with:

 <meta
      name="description"
      content="Web site created using create-react-app"
    />

I have already changed to:

<meta
          name="description"
          content="New Description"
        />

However, when sharing the website link, it still continues with the first description. I've deployed again and nothing. I'm using netlify to deploy. The same problem occurs with the title. I already checked the hosting and there is no description and title settings in them.


Solution

  • or React Helemt is an easy way to change document head (e.g. title & description ) on the go; check out their documentation for further reading ..

    <Helmet>
      <title>My Title</title>
      <meta name="description" content="Helmet application" />
    </Helmet>