Seo is Dead

  • Seo is Dead
  • SEO Beginners
  • SEO Intermediate
  • SEO Advance
  • Black Hat
  • Link Building
  • Security
  • WordPress
  • Ecommerce
  • Monetize
Home » Blog » INCREASE your Page Load SPEED with HTACCESS

by seoisdead Leave a Comment

INCREASE your Page Load SPEED with HTACCESS

Modifying the content of the .htaccess file is the fastest and most efficient way to increase the loading speed of the web, and improve the Natural Positioning in all search engines. This is not intended to be a manual on how to use htaccess.

I will simply indicate the codes that must be included, so that the performance of the page increases in a remarkable way, to improve the position in the search engines. Google uses loading speed as a ranking variable.
The .htaccess (acronym for HyperText Access) is a file that is placed in the root of your website (provided you use an Apache server), which contains certain information about how to access files. Of the wide range of possibilities it allows us, today we will focus on those that improve the loading speed:

Take a look of Cache

With this we make that people who have already visited our page and return to it, do not download again all the files, but use the ones they already have in cache (saved in their computer). It should be used in multimedia files, scripts, and style sheets. The code is as follows:

<FilesMatch “\.(js|css|ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$”>

Header set Cache-Control “public”

Header set Expires “Thu, 15 Apr 2027 20:00:00 GMT”

</FilesMatch>

With the “FilesMatch” directive we are telling to which file types (according to their extension) the cache should be applied. And with the “Header” directive we indicate the Cache-Control as “public” so that it allows to cache the file publicly, and the “Expires”, which indicates the date in which the cache ends. I prefer to use the “Expires” before the “max-age” because I have seen that it does not fail in any platform, on the other hand the “max-age” has problems in some versions of Internet Explorer.

Keep Reading this POST:  SWITCH To https With Let's Encrypt FREE SSL Certificate

This is a little tip I give you about web caching although personally I don’t use this code very much. There are cache plugins that solve these problems.

Activate compression

The idea is simple: It is faster to compress a file, send it, and decompress it, than to send it directly uncompressed. Although the process is more complex, it is much faster, since the compressed information that is sent takes up much less. The code is as follows:

<FilesMatch “\.(js|css|ico|pdf|jpg|jpeg|png|gif|php)$”>

SetOutputFilter DEFLATE

</FilesMatch>

Again, with the “FilesMatch” directive we tell it which files should be compressed, and with the SetOutputFilter directive we tell it to compress the files with the DEFLATE mod, which is the most widespread. If we wanted to compress everything, we would simply delete the “FilesMatch” directive and leave only the second line.

INCREASE your Page Load SPEED with HTACCESS

Deactivate Etags

Etags are a tag or code that is assigned to each file. The idea is that it will be bought if the Etag of the file in the browser cache matches the one on the server. If it does, the file is not downloaded. The problem with Etags is that they are defined with unique attributes for each server, and many times they do not match, forcing the file to be downloaded even if it is already in cache. Here is the code:

Header unset ETag

FileETag None

En este caso no las colocamos en una directiva “FilesMatch”, porque queremos que se anulen en todos y cada uno de los tipos de archivos, sean los que sean.

Deactivate Last-Modified

Disabling the Etags and the LastModified we totally eliminate the If-None-Match and If-Modified-Since requests, and we save the 304 Not Modified responses, so the content will remain in Caché until the Expires that we have said in point 1 tells us that it is already available.

Keep Reading this POST:  Error IonCube PHP Loader [SOLVED]

<FilesMatch “\.(js|css|ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$”>

Header unset Last-Modified

</FilesMatch>

This command can also be included in section number 1, within the “FilesMatch” directive to save a few lines of code, since they are the same type of files. It is important not to place HTM, HTML and PHP files there, as the content in these is much more dynamic, and updated more frequently. That is why we only leave Last-Modified. You can use all of these tips at the same time if we want to. This will give us a little boost to increase the loading speed of our website. However, you can also see more posts we have written to improve web security, also by writing code in the htaccess.

We give you more information about Online Marketing and SEO.
4 Main FACTORS to RANK on Google
5 Things to DELETE after Installing WORDPRESS

Related posts:

HOW to Clean your WordPress DATABASE?
How to CENTER a YOUTUBE Video on WORDPRESS Post
SWITCH To https With Let's Encrypt FREE SSL Certificate
Accelerate the LOADING of your WEBSITE and Get Better Results
Is it a Good Idea to Put your SOCIAL Networks on your WEB PAGE?

Filed Under: User Experience (UX)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Blog

About

Privacity Polity

Cookie Policy

Site Map

    Copyright © 2023

    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
    Cookie settingsACCEPT
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
    CookieDurationDescription
    cookielawinfo-checbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
    cookielawinfo-checbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
    cookielawinfo-checbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
    cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
    cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
    viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
    Functional
    Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
    Performance
    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
    Analytics
    Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
    Advertisement
    Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
    Others
    Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
    SAVE & ACCEPT