Preconnect is an important tool for optimization which can eliminate many costly roundtrips from request path. W3C has Resource Hints Specification. That includes preconnect, preload, prefetch, and prerender. We Have Developed Preconnect WordPress Plugin, Which is a Free Software available in GitHub. We have modified WordPress DNS Prefetch plugin for this purpose. Preconnect includes DNS Prefetch itself. Preconnect allows the browser to setup early connections even before an HTTP request is sent. Preconnect includes DNS lookups, TLS negotiations, TCP handshakes which in turn, eliminates roundtrip latency and saves time for users. Domain Preconnect is important for HSTS websites (like that of us).
Understanding Domain Preconnect WordPress Plugin (rel preconnect)
Domain Preconnect WordPress Plugin is available on GitHub, click here to visit that webpage (webpage will open in new tab).
Instructions and details are written there. After activating the plugin, you’ll get Preconnect as an option under settings (in WordPress Admin panel). You’ll tick to activate it and add the domains you want to add. You need to carefully add the domains adjusting with performance on webpagetest. Obviously, each open socket incurs costs and unused must be avoided.
You will get the W3C Resource Hints Specification here :
From that resource, for reconnect :
The full resource URL may not be known until the page is being constructed by the user agent – e.g. conditional loading logic, UA adaptation, etc. However, the origin from which one or more of these resources will be fetched is often known ahead of time by the developer or the server generating the response. In such cases, a preconnect hint can be used to initiate an early connection handshake such that when the resource URL is determined, the user agent can dispatch the request without first blocking on connection negotiation.
Here is an infographics :Advertisement
Domain Preconnect WordPress Plugin with KeyCDN : Optimization Guide
We suggest to use own subdomain with SSL/TLS certificate from GeoTrust and use Dyn DNS to resolve it, then point towards KeyCDN.