Open Graph namespace declaration and Accelerated Mobile Page (AMP) Validation

690 Views Asked by At

I'm updating my site to AMP but by the time I try to validate I get the following error:

The attribute 'prefix' may not appear in tag 'head'

AMP validation

And the OG namespace declaration uses prefix, how can I workaround this issue?

1

There are 1 best solutions below

1
On BEST ANSWER

Facebook sharing doesn't require the prefix attribute. So an easy workaround is to simply omit the prefix attribute. This is how ampbyexample.com does it and it still works:

https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fampbyexample.com

Nevertheless, the AMP validator should support the prefix attribute. I've filed an issue here.