time to remove domain sharding • WordPress Help

Until the implementation of HTTP / 2 in our servers, many strategies have been implemented to allow the download of the contents of our site were as fast and effective as possible, including the one called domain sharding .

This common technique, used in HTTP / 1.1, basically consisted in parallelizing content loading using subdomains of the main domain pointing to the same server, or mount the same resources on different servers, with that we tricked the browser to make content downloads in parallel, open more TCP connections, instead of sequentially, reducing the load time of a page. A very interesting improvement to optimize our page .

HTTP / 2 eliminates this need for parallelization because you can request as many resources as you need on the same connection. In fact it is likely that, using domain sharding performance will be detrimental since it creates additional TCP connections and makes it difficult for HTTP / 2 to prioritize resources, in addition to performing DNS actions unnecessary.

Note: it is difficult to measure the perjury since it depends on the amount of resources requested per domain and the weight of each of them.

So if you have implemented a widget that enables domain sharding or you have made changes to your theme to implement this technique, I advise you to disable them and use only the main domain over SSL via HTTP / 2. To undo the change, also remember that all sub-domains used, continue redirecting to the main domain, so as not to lose old links to content.

If still, you decide to maintain domain sharding, remember to make sure that your SSL certificate of domain has a wildcard that makes it valid for all domain names used, or that you have an appropriate multi-domain certificate. This will keep domain sharding and HTTP / 2, and will prevent the browser from unnecessary errors from mixed content (HTTP and HTTPS content over a secure page).

And for all those that you have not yet implemented HTTP / 2 on your servers, I remind you that it is free and very easy provided that your hosting provider integrates Let's Encrypt + HTTP / 2 in its service offer.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

HTTP / 2 and WordPress – The future of the Web

The HTTP protocol is the engine that moves the Internet, without which you could not be reading this blog, nor buy online, share content in your networks social and all those things that we are used to.

Now, this protocol, in the HTTP / 1.1 version had not been updated since 1999, but that's it: Welcome HTTP / 2!

What is HTTP / 2?

 HTTP-2 "width =" 480 "height =" 240 "srcset =" http://bootstrapx.com/wp-content/uploads/2018/06/HTTP-2.png 480w, https://ayudawp.com/wp-content/uploads/2016/02/HTTP-2-319x160.png 319w "sizes =" (max-width: 480px) 100vw, 480px "/> </p>
<p> Not a plugin, it's not a bird, it's not an airplane, it's <strong> a new network protocol for the WWW </strong> that comes to improve the current HTTP: the connections between the browser and the web page. </p>
<p> it is about <strong> an improvement of the current HTTP protocol so that the connections to web pages are faster and more efficient </strong>reducing time between calls. </p>
<p> It is <strong> a great improvement </strong>which has been pending since 1999, and that Google started with its <a href= protocol SPDY in 2009, now abandoned when adopting HTTP / 2.

Why is HTTP / 2 better?

 http-vs-http2 "width =" 550 "height =" 538 "srcset =" http://bootstrapx.com/wp-content/uploads/2018/06/http-vs-http2-550x538.gif 550w, https://ayudawp.com/wp-content/uploads/2016/02/http-vs -http2-60x60.gif 60w "sizes =" (max-width: 550px) 100vw, 550px "/> </a> </p>
<p> Broadly speaking, and being practical, some of the improvements it incorporates are: </p>
<li><strong> HTTP / 2 requests are much smaller </strong> in size since <strong> uses compression </strong>. </li>
<li><strong> HTTP / 2 uses multiplexing </strong>which allows the sending and receiving of several files at the same time [19659013] HTTP / 2 allows the server to "launch" the content gone </strong>that is, that responds with data to most requests that the client requests. This allows the server to offer data that it knows the browser will need to display a web without having to wait for the browser to receive the first response, and without having to do another cycle of requests. </li>
<li><strong> HTTP / 2 can leave the connection open </strong> for reuse </li>
<li><strong> With HTTP / 2 the browser makes many fewer requests to the server </strong>resulting in a significant reduction in page load time. </li>
<li><strong> HTTP / 2 no longer needs the Most of the HTTP 1.1 syntax </strong>such as methods, status codes, header fields, URIs, etc. The element to be displayed is transported directly between the client and the server. </li>
<li><strong> Fewer headers to transmit </strong> because HTTP / 2 uses compression </li>
<li><strong> HTTP / 2 requires a smaller amount of data </strong>which it translates into less loading time. </li>
<li><strong> HTTP / 2 changes the loading order </strong>which gets a more efficient load of the page when the elements are prioritized. </li>
<p> The first tests show <strong> a improvement of between 20% and 30% in the speed </strong> of downloading the page with this update. </p>
<h2><span id= What do I have to do to use HTTP / 2?

The first thing you should know is that ] the latest versions of the most used browsers are already compatible with HTTP / 2 which is also compatible with previous versions of the protocol, so if you decide to pass to HTTP / 2, you do not lose any users, neither visit nor sale .

The only thing you need to Benefit from this improvement is an SSL certificate and that your hosting provider enables HTTP / 2 on your server if you are already prepared for it. If you are already working with a provider like SiteGround ask to have this functionality enabled, since your servers are ready .

If you have a online store surely you already have an SSL certificate so, what are you waiting for? Speed ​​up your website! Start using HTTP / 2!

HTTP / 2 and WordPress

 WordPress http2

Actually you do not need to do anything in WordPress so you can use the HTTP / 2 protocol apart from having an SSL certificate installed and active and that your hosting provider will activate HTTP / 2.

On the other hand, when using HTTPS, you must make sure that you are serving all your content in https , without mixed content that is, that there is nothing in your site that is still used in http.

Where if you have to do some work, if you did not do it already when going to HTTPS and it is to check that you do not use anything in http, instead of https .

I am referring to images, permanent links, redirects, etc. You should check your WordPress configuration file ( wp-config.php ) to verify that you define your routes with https, and the file .htaccess to review any possible redirection that you still have to an http, for example.

Also, it's not too much to check if there is a plugin that generates absolute http addresses instead of relative ones, whatever that might be.

Of course, you should have in Settings -> General the site address and WordPress in https.

There are plugins like, Really Simple SSL the one that I recommended you the other day talking about SSL which does most of this work, but it does not hurt a review for mixed content. The same browser will inform you if this is happening or not.

But come on, that in principle you do not have to do anything to use HTTP / 2 that you should not already do to have your WordPress with HTTPS but if you were not exhaustive at the time maybe now it is not too much to put yourself to it, for take advantage of all the advantages of both technologies .

HTTP / 2 and developers

 http2 vs http1

Over the years, developers and experts in SEO have developed practices to try to bypass the restrictions and weaknesses of the HTTP / 1.1 protocol, so both plugins and themes have been incorporating a series of tricks that, if active HTTP / 2 is not only necessary but they are counterproductive .

For example, it is very common to use compression, combination and asynchronous loading of CSS files and JavaScript . There are themes that do it by default, and a multitude of SEO plugins, let alone Cache, which also incorporate it.

This, which is a good idea if you're on HTTP / 1.1 is just what you should not do in HTTP / 2 because you do not need it and you will be using resources and processes that harm the performance of your web, being unnecessary.

What is a practice totally discouraged in HTTP / 2 is the fragmentation in several domains known as " sharding ", since it forces more DNS queries.

In short, if you are a developer of WordPress themes or plugins, keep in mind that you do not need to use more sprites or combine unnecessary files or upload assets in your code .


In short, is a good idea to set up HTTP / 2 on your website since you're going to improve the user experience, thanks to the fact that Downloading the page will be faster and more orderly, and is compatible with your current site, and in principle you do not have to implement anything in your code, nor install any plugin or anything similar.

The HTTP improvements / 2 are tremendous and views in a practical way can be summarized in …

  1. Web faster
  2. Web more secure, it forces the adoption of SSL
  3. Web more optimized for mobile
  4. Less consumption of server resources

In case you are not clear enough, I summarize the changes you must do on your website to offer maximum speed and an unbeatable user experience :

  1. Activate a CDN
  2. Offer your secure website through HTTPS with an SSL certificate
  3. Ask your hosting provider to activate HTTP / 2 on the server

Do you already have your website on HTTP / 2? Do you have any doubts? Something that has happened to me?

If you want to ask or share something about it, do not cut yourself, we're all looking forward to your doubts or advice and so we learn more. There you have the comments.

This article would not have been possible without the inestimable help of the great Fernando Puente that to see if at once he registers as a user of the blog and the solito is encouraged 😉

NOTICE : This publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you: