Speeding Up A Drupal 8 Site With Internal Cache, AdvAgg Module and the CDN Module on Centos

In this video I will be showing how to get a speed increase from a website that is running Drupal 8, by turning on the built in page cache module and adding two external modules which are the AdvAgg javascript and css aggregator, along with the CDN module which changes the urls for the static assets, so that they are served from a CDN that hopefully has servers near to the people visiting your site. I have looked at other videos on Youtube that show how to set up a CDN in Drupal and I noticed that the authors don't seem to care about the fact that a CDN can cause your website to get a duplicate content penalty from the search engines, because the CDNs will also make a copy of the HTML that your site outputs, so I have also included some changes that you can make in the .htaccess file and also at your CDN host, so that your webserver will not serve any HTML to the CDN, which then helps to stop any duplicate content from showing up. In this video I have used KeyCDN to test the speed increase on my site, but you should be able to do the same thing with any other decent CDN host, who allows you to configure the host headers that are sent from them to your server. You should also make sure to use a CDN host that uses HTTP/2, so that you can take advantage of the extra speed boost that it brings to your website. Also if you are running a webserver that is not configured to use the HTTP/2 protocol, then you can search on my channel for one of my videos that explains how to configure apache with HTTP/2 support.


modules to get:
https://www.drupal.org/project/advagg
https://www.drupal.org/project/cdn
https://www.drupal.org/project/minifyhtml
https://www.drupal.org/project/minifyjs

https://drupal8.macpczone.co.uk
eHJZzchfmYIM


curl --header "X-Pull: ?????????" https://www.macpczone.co.uk

nano .htaccess
-----------------------------------
  RewriteEngine on

  RewriteCond %{HTTP:X-Pull} eHJZzchfmYIM
  RewriteRule \.(html|php)$ - [F]
-----------------------------------