What is a .htaccess File :
.htaccess a file type which is used by seo experts for various issues occurred with a website. The most popular way to use a .htaccess file is for 301 redirection, that is to redirect non www url to www and www to without www. we just need to put some line of codes in a file and then we upload that on the server through ftp access. We upload the file in the same root where .index file is placed.
Recommended post : Know Meta tags
How to create .htaccess File
To create a .htaccess file please follow the below steps :
- Create a text document
- Paste the required .htaccess code
- Now click on save as
- write file name as .htaccess
- select all types in save as type option.
- Now click on save. the .htaccess file will be created.
|Create .htaccess file|
.htaccess code to remove 301 error – non www to www or www to without www redirection in a website
Code for www to non www redirect
code for non www to www redirect
Thanks for being here. If you have any problem feel free to ask me in the comment section !!