大网数据广告活动
网站运营与故障问答

Structured data testing tool complains about image url (INVALID_URL)

· 52CE 我爱测

I set the url for the image and I can see image by typing url in the browser, but structured testing tool complains about it. It should be mentioned that I am on development server with http protocol and without ssl certificate. …

问题原文

原帖链接 · SEYED BABAK ASHRAFI · CC BY-SA 4.0

I set the url for the image and I can see image by typing url in the browser, but structured testing tool complains about it. It should be mentioned that I am on development server with http protocol and without ssl certificate.

image url: http://s.my-site.local/u/2020/07/logo.png

How can I solve this error?

Update:

Here is the json-ld that I used:

{
  "@context": "http:\/\/schema.org\/",
  "@type": "Organization",
  "@id": "http:\/\/my-site.local#Organization",
  "logo": "http:\/\/s.my-site.local\/u\/2020\/07\/logo.png",
  "identifier": "http:\/\/my-site.local#Organization",
  "name": "some name",
  "description": "some description",
  "url": "http:\/\/my-site.local"
}

已采纳解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

The Structured Data Testing Tool chokes on .local domains, because it expects the URLs in your structured data to be publicly accessible.

A workaround would be to change your .local domain to a .com specifically for the structured data test, so that Google doesn't see it as invalid. Google doesn't actually try to visit the URLs when it validates the structured data, so just replacing the TLD should be good enough.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2020-07-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。