Archived topic
Link and html check error: http://fonts.googleapis.com/ Status: 404 Not Found
3 replies · Started by Faye on July 21, 2017
Hi there,
Every site I build I run through the W3C link and html checker. I always see the following two errors on my generate press themes from the link checker:
Line: 23 http://fonts.googleapis.com/
Status: 404 Not Found
The link is broken. Double-check that you have not made any typo, or mistake in copy-pasting. If the link points to a resource that no longer exists, you may want to remove or fix the link.
error Line: 25 https://fonts.gstatic.com/
Status: 404 Not Found
The link is broken. Double-check that you have not made any typo, or mistake in copy-pasting. If the link points to a resource that no longer exists, you may want to remove or fix the link.
And I always see this error from the html checker:
Error: Bad value //fonts.googleapis.com/css?family=Open+Sans:300,300italic,regular,italic,600,600italic,700,700italic,800,800italic|Lato:100,100italic,300,300italic,regular,italic,700,700italic,900,900italic for attribute href on element link: Illegal character in query: | is not allowed.
This one apparently can be fixed by encoding the vertical bar (see here: https://teamtreehouse.com/community/-w3c-validator-error-with-google-font-link)
I can't fix these myself without digging through generatepress - is there a plan to get these tidied up?
Many thanks,
Faye (obsessive error checker).
Hi there,
Those first two errors are false positives. GP sends a preconnect request to Google so that font are preloaded, making them load faster.
The second error can be fixed, but Google specific tells you to use the vertical bars.
If you want to convert them, try this: https://generatepress.com/forums/topic/google-fonts-and-w3c-validator-error/#post-213879
Hope this helps :)
Ahhhh. Okay, I understand.
I'll ignore the | error.
Thank you for clarification :-)
Faye.
No problem :)