Mobile app version of vmapp.org
Login or Join
Michele947

: Absolute or relative local URL in Schema.org JSON-LD? I'm writing the Schema.org JSON-LD for a website now. For a url within my site, what will work / best practice? "url": "http://myawesomesite.com/content.html"

@Michele947

Posted in: #JsonLd #RelativeUrls #SchemaOrg #Url

I'm writing the Schema.org JSON-LD for a website now. For a url within my site, what will work / best practice?

"url": "http://myawesomesite.com/content.html"


or

"url": "/content.html"

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele947

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

For Schema.org, JSON-LD, and conforming consumers, it doesn’t matter.

The relative form is shorter and doesn’t require changes if you change the domain. But if a consumer happens to access your document under a different URL, the URL values will be different, too.

The absolute form is what you’d use anyway for external links, and it helps making sure that consumers will always end up at the intended place. But it’s somewhat longer, and if you want to change the domain, you have to update your structured data.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme