SlideShare a Scribd company logo
Google Mobile First Index
Speed up your web / Apache / SEO
Emirodgar / https://emirodgar.com - @emirodgar
Optimize Apache http web server & web
Check Apache active modules
We need access through SSH in order to execute linux commands
Check Apache active modules with:
● apache2ctl -M
If not activated, we need to turn on expires and headers:
● a2enmod expires
● a2enmod headers
After that, we need to restart the server
● service apache2 restart
Apache .htaccess file
Now we need to edit .htaccess file which is located at the root of our site
(base www dir).
If it doesn’t exist, we can create it through FTP. After that we just need
to add some lines in order to speed up our site. We are going to active:
● Cache-control
● GZIP Compression
● Keep alive
● Etag
.htaccess set cache-control
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/js "access 1 month"
ExpiresByType text/html "access 1 day"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>
.htaccess set Etag
Etag helps to use cache memory in a more efficient way. It works like a digital print, it only changes when
a file has changed.
FileETag MTime Size
Check if it is working
.htaccess GZIP compression
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
Check if it is working
.htaccess set keep-alive
Allow to transfer multiple files between server and browser
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
Check if it is working
.htaccess redirect errors to homepage
This code will help us to redirect all errors to the homepage. Use it carefully. It doesn’t affect the speed
but can help us to handle multiple errors.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /? [L,R=301]
.htaccess prevent hotlinking
As the previous point, it doesn’t affect the load time, but can help us to control our resources preventing
others sites to consume them.
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?emirodgar.com [NC]
RewriteRule .(jpg|jpeg|png|gif|svg)$ https://domain.com/image.jpg [NC,R,L]
Optimize resources
In order to speed up we need to work with
optimized files:
● Compress HTML
● Compress CSS
● Compress JS
● Compress images
Compress and optimize HTML
Compress CSS
Select CSS used
Make sure you only include in your page the CSS styles you are actually
using in the site.
CSS Used is a Chrome plugin that will select the CSS you need (export &
create a new final file). Firefox has similar plugins with the same
functionality.
Compress Javascript
Compress images
We can use one of the several tools we have online:
● https://kraken.io/web-interface
● http://optimizilla.com
● https://compressor.io
● https://tinypng.com
Use a cookieless subdomain as CDN
Let’s create our own CDN (Content Delivery Network). You can also use some service as Cloudflare (free
and paid plans available).
● Create a subdomain of your own domain or use another domain
● Load static files as CSS, JS and images from this new access
Learn more about cookie free domains.
Use a cookieless subdomain as CDN - Analytics
If your are using Google Analytics, make sure you are not generating cookies on the CDN subdomain. For
that, set cookie_domain to none.
Install modpagespeed
You can also install mod_pagespeed in your server. Once installed, learn how to configure it.
cd /tmp
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
dpkg -i mod-pagespeed-stable_current_amd64.deb
Check if it is working
Google Mobile First Index
Speed up your web / Apache / SEO
Emirodgar / https://emirodgar.com - @emirodgar

More Related Content

What's hot

Best Practices for creating WP REST API by Galkin Nikita
Best Practices for creating WP REST API by Galkin NikitaBest Practices for creating WP REST API by Galkin Nikita
Best Practices for creating WP REST API by Galkin Nikita
WordCamp Kyiv
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kekäläinen
 
Altitude SF 2017: Advanced VCL: Shielding and Clustering
Altitude SF 2017: Advanced VCL: Shielding and ClusteringAltitude SF 2017: Advanced VCL: Shielding and Clustering
Altitude SF 2017: Advanced VCL: Shielding and Clustering
Fastly
 
007. Redux middlewares
007. Redux middlewares007. Redux middlewares
007. Redux middlewares
Binh Quan Duc
 
Capybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automationCapybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automation
COMAQA.BY
 
Speed Up Your Website
Speed Up Your WebsiteSpeed Up Your Website
Speed Up Your Website
Anupom Syam
 
Asynchronous JavaScript loading
Asynchronous JavaScript loadingAsynchronous JavaScript loading
Asynchronous JavaScript loading
yay w00t
 
深入淺出RoR
深入淺出RoR深入淺出RoR
深入淺出RoR
Eric Lee
 
ReactDC Intro to NextJS 9
ReactDC Intro to NextJS 9ReactDC Intro to NextJS 9
ReactDC Intro to NextJS 9
Allison Kunz
 
Basic testing with selenium
Basic testing with seleniumBasic testing with selenium
Basic testing with selenium
Søren Lund
 
Web Development with NodeJS
Web Development with NodeJSWeb Development with NodeJS
Web Development with NodeJS
Riza Fahmi
 
Composing re-useable ETL on Hadoop
Composing re-useable ETL on HadoopComposing re-useable ETL on Hadoop
Composing re-useable ETL on HadoopPaul Lam
 
Scaling PHP web apps
Scaling PHP web appsScaling PHP web apps
Scaling PHP web apps
Harald Zeitlhofer
 
Sins Against Drupal 1
Sins Against Drupal 1Sins Against Drupal 1
Sins Against Drupal 1
Aaron Crosman
 
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Fastly
 
EWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
Rob Tweed
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIs
Rob Tweed
 
Improve Magento Performance
Improve Magento PerformanceImprove Magento Performance
Improve Magento Performance
Harald Zeitlhofer
 

What's hot (20)

Best Practices for creating WP REST API by Galkin Nikita
Best Practices for creating WP REST API by Galkin NikitaBest Practices for creating WP REST API by Galkin Nikita
Best Practices for creating WP REST API by Galkin Nikita
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
Altitude SF 2017: Advanced VCL: Shielding and Clustering
Altitude SF 2017: Advanced VCL: Shielding and ClusteringAltitude SF 2017: Advanced VCL: Shielding and Clustering
Altitude SF 2017: Advanced VCL: Shielding and Clustering
 
007. Redux middlewares
007. Redux middlewares007. Redux middlewares
007. Redux middlewares
 
Capybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automationCapybara + RSpec - ruby dsl-based web ui qa automation
Capybara + RSpec - ruby dsl-based web ui qa automation
 
Speed Up Your Website
Speed Up Your WebsiteSpeed Up Your Website
Speed Up Your Website
 
Asynchronous JavaScript loading
Asynchronous JavaScript loadingAsynchronous JavaScript loading
Asynchronous JavaScript loading
 
深入淺出RoR
深入淺出RoR深入淺出RoR
深入淺出RoR
 
ReactDC Intro to NextJS 9
ReactDC Intro to NextJS 9ReactDC Intro to NextJS 9
ReactDC Intro to NextJS 9
 
Hello world
Hello worldHello world
Hello world
 
Basic testing with selenium
Basic testing with seleniumBasic testing with selenium
Basic testing with selenium
 
Web Development with NodeJS
Web Development with NodeJSWeb Development with NodeJS
Web Development with NodeJS
 
Composing re-useable ETL on Hadoop
Composing re-useable ETL on HadoopComposing re-useable ETL on Hadoop
Composing re-useable ETL on Hadoop
 
Scaling PHP web apps
Scaling PHP web appsScaling PHP web apps
Scaling PHP web apps
 
Sins Against Drupal 1
Sins Against Drupal 1Sins Against Drupal 1
Sins Against Drupal 1
 
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
 
EWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIs
 
Performance
PerformancePerformance
Performance
 
Improve Magento Performance
Improve Magento PerformanceImprove Magento Performance
Improve Magento Performance
 

Similar to 2018 Google Mobile First Index - Speed up Apache & Web for SEO

Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
Andy Kucharski
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
NGINX, Inc.
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101
Angus Li
 
Guide 6 - Tapping Into Your Website Configuration File.pdf
Guide 6 - Tapping Into Your Website Configuration File.pdfGuide 6 - Tapping Into Your Website Configuration File.pdf
Guide 6 - Tapping Into Your Website Configuration File.pdf
persuebusiness
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Anam Ahmed
 
Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012
eballisty
 
High Performance Web Sites
High Performance Web SitesHigh Performance Web Sites
High Performance Web Sites
Ravi Raj
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Trivandrum
 
Hotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdf
Hotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdfHotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdf
Hotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdf
GurzuInc
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
Bud Siddhisena
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
Bastian Grimm
 
Migration Best Practices - SEOkomm 2018
Migration Best Practices - SEOkomm 2018Migration Best Practices - SEOkomm 2018
Migration Best Practices - SEOkomm 2018
Bastian Grimm
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
WordPress
 
Performance and Scalability
Performance and ScalabilityPerformance and Scalability
Performance and Scalability
Mediacurrent
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
supertom
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
Siarhei Barysiuk
 
Website optimization
Website optimizationWebsite optimization
Website optimization
Mindfire Solutions
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 

Similar to 2018 Google Mobile First Index - Speed up Apache & Web for SEO (20)

Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101
 
Guide 6 - Tapping Into Your Website Configuration File.pdf
Guide 6 - Tapping Into Your Website Configuration File.pdfGuide 6 - Tapping Into Your Website Configuration File.pdf
Guide 6 - Tapping Into Your Website Configuration File.pdf
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012
 
High Performance Web Sites
High Performance Web SitesHigh Performance Web Sites
High Performance Web Sites
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 
Hotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdf
Hotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdfHotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdf
Hotwire and Turbo - Knowledge Ketchup - Prajit Bhandari.pdf
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Optimize
OptimizeOptimize
Optimize
 
Migration Best Practices - SEOkomm 2018
Migration Best Practices - SEOkomm 2018Migration Best Practices - SEOkomm 2018
Migration Best Practices - SEOkomm 2018
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
 
Performance and Scalability
Performance and ScalabilityPerformance and Scalability
Performance and Scalability
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Website optimization
Website optimizationWebsite optimization
Website optimization
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 

More from Emilio Rodríguez García

Webinar - Smartup - ¿Cómo será el SEO en 2020?
Webinar - Smartup - ¿Cómo será el SEO en 2020?Webinar - Smartup - ¿Cómo será el SEO en 2020?
Webinar - Smartup - ¿Cómo será el SEO en 2020?
Emilio Rodríguez García
 
USAL - Masterclass - Analítica web 2021
USAL - Masterclass - Analítica web 2021USAL - Masterclass - Analítica web 2021
USAL - Masterclass - Analítica web 2021
Emilio Rodríguez García
 
Big Data + Marketing Digital
Big Data + Marketing DigitalBig Data + Marketing Digital
Big Data + Marketing Digital
Emilio Rodríguez García
 
Google Analytics 4 - Webinar (Smartup)
Google Analytics 4 - Webinar (Smartup)Google Analytics 4 - Webinar (Smartup)
Google Analytics 4 - Webinar (Smartup)
Emilio Rodríguez García
 
Bases de datos NoSQL en entornos Big Data
Bases de datos NoSQL en entornos Big DataBases de datos NoSQL en entornos Big Data
Bases de datos NoSQL en entornos Big Data
Emilio Rodríguez García
 
Exprimiendo Google Analytics
Exprimiendo Google AnalyticsExprimiendo Google Analytics
Exprimiendo Google Analytics
Emilio Rodríguez García
 
Técnicas de análisis de datos
Técnicas de análisis de datosTécnicas de análisis de datos
Técnicas de análisis de datos
Emilio Rodríguez García
 
Analítica y medición digital
Analítica y medición digitalAnalítica y medición digital
Analítica y medición digital
Emilio Rodríguez García
 
Business intelligence vs experiencia de usuario
Business intelligence vs experiencia de usuarioBusiness intelligence vs experiencia de usuario
Business intelligence vs experiencia de usuario
Emilio Rodríguez García
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
Emilio Rodríguez García
 
Inbound marketing
Inbound marketingInbound marketing
Inbound marketing
Emilio Rodríguez García
 
Omnicanalidad
OmnicanalidadOmnicanalidad
Plan de marketing digital
Plan de marketing digitalPlan de marketing digital
Plan de marketing digital
Emilio Rodríguez García
 
Identidad digital y reputación online
Identidad digital y reputación onlineIdentidad digital y reputación online
Identidad digital y reputación online
Emilio Rodríguez García
 
Capa de negocios tecnológicos - Modelos de negocios (IV)
Capa de negocios tecnológicos - Modelos de negocios (IV)Capa de negocios tecnológicos - Modelos de negocios (IV)
Capa de negocios tecnológicos - Modelos de negocios (IV)
Emilio Rodríguez García
 
Los números también importan - Modelos de negocio (III)
Los números también importan - Modelos de negocio (III)Los números también importan - Modelos de negocio (III)
Los números también importan - Modelos de negocio (III)
Emilio Rodríguez García
 
Modelos de negocio en la era digital - Modelos de negocio (II)
Modelos de negocio en la era digital - Modelos de negocio (II)Modelos de negocio en la era digital - Modelos de negocio (II)
Modelos de negocio en la era digital - Modelos de negocio (II)
Emilio Rodríguez García
 
Introducción a la transformación digital - Modelos de negocio (I)
Introducción a la transformación digital - Modelos de negocio (I)Introducción a la transformación digital - Modelos de negocio (I)
Introducción a la transformación digital - Modelos de negocio (I)
Emilio Rodríguez García
 
Principios básicos de Google Analytics
Principios básicos de Google AnalyticsPrincipios básicos de Google Analytics
Principios básicos de Google Analytics
Emilio Rodríguez García
 

More from Emilio Rodríguez García (19)

Webinar - Smartup - ¿Cómo será el SEO en 2020?
Webinar - Smartup - ¿Cómo será el SEO en 2020?Webinar - Smartup - ¿Cómo será el SEO en 2020?
Webinar - Smartup - ¿Cómo será el SEO en 2020?
 
USAL - Masterclass - Analítica web 2021
USAL - Masterclass - Analítica web 2021USAL - Masterclass - Analítica web 2021
USAL - Masterclass - Analítica web 2021
 
Big Data + Marketing Digital
Big Data + Marketing DigitalBig Data + Marketing Digital
Big Data + Marketing Digital
 
Google Analytics 4 - Webinar (Smartup)
Google Analytics 4 - Webinar (Smartup)Google Analytics 4 - Webinar (Smartup)
Google Analytics 4 - Webinar (Smartup)
 
Bases de datos NoSQL en entornos Big Data
Bases de datos NoSQL en entornos Big DataBases de datos NoSQL en entornos Big Data
Bases de datos NoSQL en entornos Big Data
 
Exprimiendo Google Analytics
Exprimiendo Google AnalyticsExprimiendo Google Analytics
Exprimiendo Google Analytics
 
Técnicas de análisis de datos
Técnicas de análisis de datosTécnicas de análisis de datos
Técnicas de análisis de datos
 
Analítica y medición digital
Analítica y medición digitalAnalítica y medición digital
Analítica y medición digital
 
Business intelligence vs experiencia de usuario
Business intelligence vs experiencia de usuarioBusiness intelligence vs experiencia de usuario
Business intelligence vs experiencia de usuario
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
Inbound marketing
Inbound marketingInbound marketing
Inbound marketing
 
Omnicanalidad
OmnicanalidadOmnicanalidad
Omnicanalidad
 
Plan de marketing digital
Plan de marketing digitalPlan de marketing digital
Plan de marketing digital
 
Identidad digital y reputación online
Identidad digital y reputación onlineIdentidad digital y reputación online
Identidad digital y reputación online
 
Capa de negocios tecnológicos - Modelos de negocios (IV)
Capa de negocios tecnológicos - Modelos de negocios (IV)Capa de negocios tecnológicos - Modelos de negocios (IV)
Capa de negocios tecnológicos - Modelos de negocios (IV)
 
Los números también importan - Modelos de negocio (III)
Los números también importan - Modelos de negocio (III)Los números también importan - Modelos de negocio (III)
Los números también importan - Modelos de negocio (III)
 
Modelos de negocio en la era digital - Modelos de negocio (II)
Modelos de negocio en la era digital - Modelos de negocio (II)Modelos de negocio en la era digital - Modelos de negocio (II)
Modelos de negocio en la era digital - Modelos de negocio (II)
 
Introducción a la transformación digital - Modelos de negocio (I)
Introducción a la transformación digital - Modelos de negocio (I)Introducción a la transformación digital - Modelos de negocio (I)
Introducción a la transformación digital - Modelos de negocio (I)
 
Principios básicos de Google Analytics
Principios básicos de Google AnalyticsPrincipios básicos de Google Analytics
Principios básicos de Google Analytics
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 

2018 Google Mobile First Index - Speed up Apache & Web for SEO

  • 1. Google Mobile First Index Speed up your web / Apache / SEO Emirodgar / https://emirodgar.com - @emirodgar
  • 2. Optimize Apache http web server & web
  • 3. Check Apache active modules We need access through SSH in order to execute linux commands Check Apache active modules with: ● apache2ctl -M If not activated, we need to turn on expires and headers: ● a2enmod expires ● a2enmod headers After that, we need to restart the server ● service apache2 restart
  • 4. Apache .htaccess file Now we need to edit .htaccess file which is located at the root of our site (base www dir). If it doesn’t exist, we can create it through FTP. After that we just need to add some lines in order to speed up our site. We are going to active: ● Cache-control ● GZIP Compression ● Keep alive ● Etag
  • 5. .htaccess set cache-control <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/js "access 1 month" ExpiresByType text/html "access 1 day" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access plus 1 month" </IfModule>
  • 6. .htaccess set Etag Etag helps to use cache memory in a more efficient way. It works like a digital print, it only changes when a file has changed. FileETag MTime Size
  • 7. Check if it is working
  • 8. .htaccess GZIP compression <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule>
  • 9. Check if it is working
  • 10. .htaccess set keep-alive Allow to transfer multiple files between server and browser <ifModule mod_headers.c> Header set Connection keep-alive </ifModule>
  • 11. Check if it is working
  • 12. .htaccess redirect errors to homepage This code will help us to redirect all errors to the homepage. Use it carefully. It doesn’t affect the speed but can help us to handle multiple errors. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /? [L,R=301]
  • 13. .htaccess prevent hotlinking As the previous point, it doesn’t affect the load time, but can help us to control our resources preventing others sites to consume them. RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?emirodgar.com [NC] RewriteRule .(jpg|jpeg|png|gif|svg)$ https://domain.com/image.jpg [NC,R,L]
  • 14. Optimize resources In order to speed up we need to work with optimized files: ● Compress HTML ● Compress CSS ● Compress JS ● Compress images
  • 17. Select CSS used Make sure you only include in your page the CSS styles you are actually using in the site. CSS Used is a Chrome plugin that will select the CSS you need (export & create a new final file). Firefox has similar plugins with the same functionality.
  • 19. Compress images We can use one of the several tools we have online: ● https://kraken.io/web-interface ● http://optimizilla.com ● https://compressor.io ● https://tinypng.com
  • 20. Use a cookieless subdomain as CDN Let’s create our own CDN (Content Delivery Network). You can also use some service as Cloudflare (free and paid plans available). ● Create a subdomain of your own domain or use another domain ● Load static files as CSS, JS and images from this new access Learn more about cookie free domains.
  • 21. Use a cookieless subdomain as CDN - Analytics If your are using Google Analytics, make sure you are not generating cookies on the CDN subdomain. For that, set cookie_domain to none.
  • 22. Install modpagespeed You can also install mod_pagespeed in your server. Once installed, learn how to configure it. cd /tmp wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb dpkg -i mod-pagespeed-stable_current_amd64.deb
  • 23. Check if it is working
  • 24.
  • 25.
  • 26. Google Mobile First Index Speed up your web / Apache / SEO Emirodgar / https://emirodgar.com - @emirodgar

Editor's Notes

  1. Link: https://httpd.apache.org/docs/2.4/es/mod/core.html
  2. Link: https://abdussamad.com/archives/169-Apache-optimization:-KeepAlive-On-or-Off.html
  3. Check server response: https://www.sumologic.com/apache/analyzing-response-time/