Both:
Explicit prefetches
Typically the browser only scans the HTML for foreign domains. If you have resources that are outside of your HTML (a javascript request to a remote server or a CDN that hosts content that may not be present on every page of your site, for example) then you can queue up a domain name to be prefetched.
<link rel="dns-prefetch" href="//example.com"> <link rel="dns-prefetch" href="//ajax.googleapis.com">
You can use as many of these as you need, but it's best if they are all immediately after the Meta Charset element (which should go right at the top of the head), so the browser can act on them ASAP.
Source: https://github.com/h5bp/html5-boilerplate/blob/master/doc/extend.md#explicit-prefetches