.htaccess

What is .htaccess?

Last modified: February 23, 2020

Cloudways

When a developer or website designer talks about .htaccess, they are referring to a configuration file that is read by the hosting server of your website. It can override numerous server configuration settings and is used for authorisation, cache control, website optimization and URL rewriting.

All of these items can have a significant impact on your website. And they can make you more secure and improve website performance, helping you to rank better and convert more visitors to your site.

However, the major function of the .htaccess file is the rewrite URLs. This can make them cleaner and therefore more readable by humans and search engines. If you can rewrite your URLs better, then you can appear higher in search rankings.

A good example of how the links can be changed are the with permalinks section of WordPress administration. To get to this, go to your settings tab and then click on permalinks.

Find your permalinks settings here

From here you have numerous options to change the structure of your URLs. For instance, you could have a simple number to identify the page.

However, the best option is to choose the ‘post name’ option. This is because this is the optimum option for ranking for pages. The ‘post name’ doesn’t mean that you have to have the full name in the URL, this can be edited within the blog post. For instance:

example.com/how-to-improve-your-seo

can be changed to:

example.com/improve-seo

The shorter your domain names, with vital keywords within, the better it is for your site’s SEO.

If your WordPress website is unable to write the .htaccess file, you might need to write it manually. This can be very risky and could break your website if it is not done correctly. So, before doing any manual changes, always save a backup of your .htaccess file.

You will also find that some plugins, like caching plugins, will modify your .htaccess file. This is in order to ensure that the plugin is having an impact on your site’s performance.

If you need to find the .htaccess file, look for it in your root directory of your WordPress website using an FTP client. However, some won’t display it by default, for security reasons. To get around this, you need to tell your FTP client to display hidden files.

Recommended Reading:

Shared WordPress Hosting

Show More

* This button will show the rest of the post and open up an offer from a vendor
Save 4 Later
Email liked links to yourself

    Related glossary Items