Semalt Expert Describes WordPress Default .htaccess Rules

Recently, you may have noticed a .htaccess file present in the root folder of your WordPress website. In this article, you will learn many reasons for this adjustment that were stipulated by a top expert from Semalt, Artem Abgarian.

There are many cases of referral spam attacks which compromise the way our website responds in Google Analytics. Referral spam causes many fake web visits affecting the quality of the analytics information. There are some WordPress .htaccess rules which dictate the permissions for aspects such as web crawlers and bots. Majority of the website host services uses the Apache server. When a website is installing in WordPress, there are some rules which it enters in the .htaccess file. This item is the file which appears in the root directory of your website. Different servers have multiple methods of making adjustments to the permalink. In some cases, webmasters run some codes which help in eliminating some of the referral spam.

WordPress .htaccess rules

When a website installation is in progress on WordPress, most of the important aspects of its default installation appears as lines of code. Running codes on your website should be a process which happens with care. In some cases, the entire website can fail to respond. If you are not sure about what you are doing, consulting some SEO agency or qualified personnel can prevent adverse effects. Some of the lines of code which link to the include:

# BEGIN WordPress

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

# END WordPress

The rewrite rule present in the root folder provides additional functionality regarding the performance option of this website. This file contains the path to the folder where you install your WordPress folder. Web developers use this link to help them develop effective measures to control permissions while using a website. For instance, a website can experience an error 404 when trying to get access.

The first and last lines of this code contain an "#." These should serve the purpose of comments to show you how to access your .htaccess file. Some of the benefits of the WordPress .htaccess rules include the prevention of Google Analytics referral spam attacks. The "Rewriterule" directives can help in preventing a bot from accessing the index.php. This effect is crucial in blocking fake traffic which might be coming from referral spam domains.


Referral spam is becoming a common problem affecting companies and their websites. In some cases, websites with an Apache server depend on a .htaccess file present in the root directory of your website. This feature is also standard for common WordPress websites. This file contains the rules which dictate how web visits or crawlers interact with your database. This web development article contains some of the techniques which you can use to make adjustments to your website response. In some cases, you can be able to block harmful referral programs. Fake traffic should not be a problem affecting your Google Analytics traffic information. Some of the

send email