From an SEO point of view, the only thing that matters is that the URL is correctly pointing to a resolvable document. The reason for this is that all URL's, absolute or relative, are resolved as an absolute URL.
Absolute URL's are inflexible as they don't adapt to their context. Though if they're generated on the fly from a system then that's not a big problem.
Relative URL's come in different forms and there are some benefits.
- Page relative URL's (e.g.
- Domain relative URL's (e.g.
- Protocol relative URL's (e.g.
Each behaves differently, and the benefits / disadvantages depends on your own situation.
Page relative URL's are fragile and rely on a consistent relationship between the linking document and linked-to document. If this relationship changes then broken links will occur.
Domain relative URL's stay on the same domain and using the same protocol, but otherwise specify a full path. This removes the coupling between the linking document and the linked-to document, though clearly links may still break with movement of pages.
Protocol relative URL's are great for calling resources from other subdomains or domains, but retaining the protocol in use. This is especially effective for resource linked to from a page which may be served with either http or https. The protocol relative link ensures that all resources are requested with the same protocol, which stops warnings on https pages about unencrypted resources.
You should evaluate each on its ability to continue to resolve to reachable documents - if all your links are auto generated then absolute URL's are fine. If not, domain relative URL's offer a lot of flexibility and protocol relative links are great for assets served over either http or https.