Hreflang in french

My site is in french but the code indicates that it is in english. I’d like to be able to change that.
It is very inconvenient regarding my SEO…

Thanks,

Hello @BTS
You can read this post: Change <html lang="en"> to <html lang="fr">

Bonne journée !

1 Like

Thanks! I put it in the header?

Yes @BTS Just place this code into your app settings custom code header section.

<script>
   document.querySelector('html').removeAttribute('lang');
</script>
<script>
   document.querySelector('html').setAttribute('lang', 'fr');
</script>

Unfortunately, it doesn’t seem to work:

Hey @BTS !
Did you publish your app after adding the code? I used the same code and it works fine on my end.

I added it here, settings–>Custom Code–>Header section.

Yes I did. I’ll try something because my header has multiple code lines.

Cool, you can try to add the codes at the very end.

1 Like

I think it works. Could you check?

I checked and yes it works!