.htaccess ফাইল দিয়ে আমরা এসইও এর অনেক কিছু ফিক্স করতে পারি যা অনেকেই জানি না। এই ভিডিও থেকে কিছুটা আইডিয়া পাবেন যে কি কি করতে পারবেন এবং কিভাবে সেগুলো করবেন।
In order to apply various SEO fixes on your website; you may need to edit your htaccess file.
Some htaccess codes for SEO
Non WWW to WWW Version (Force WWW on your domain)
RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [NC]RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
WWW to Non-WWW (Force non www version for your domain)
RewriteEngine on RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301,NC]
Page by page 301 Redirection From One Site To Another Site (Old Domain To New Domain)
<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]
</IfModule>
http to https (non SSL to SSL) Redirection
RewriteEngine on
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^ https://www.example.com%{REQUEST_URI} [NC,L,R=301,NE]
Redirect certain extension (If you change your URL extension from .php to .html)
RewriteEngine On RewriteCond %{REQUEST_URI} .php$ RewriteRule ^(.*).php$ /$1.htm [R=301,L]
Redirect old domain to a new domain
RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]
Redirect Old File/Page To New File/Page (Single File)
Redirect 301 /oldfile.htm http://example.net/newfile.htm
In this tutorial you will learn about some popular htaccess hacks for SEO.
Download the htaccess codes here: Click To Download
Vaiya amar redirect kaj kortace na. redirect korar por amar website kuje pay na. please solution……..
apnar htaccess file ta comment koren tu dekhi…
RewriteEngine on
RewriteCond %{HTTP_HOST} ^jewelryfair.com [NC]
RewriteRule ^(.*)$ http://www.jewelryfair.com/$1 [L,R=301,NC]
Follow the codes below:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]
Vaiya ami to domain change korbo na. ai code ta mone hoy .com theke .net a change korar code. ami to www te dekate chai……
You can use this site to generate your code properly: http://www.htaccessredirect.net
vaiya ami amr website er url https://mysite.com naki https://www.mysite.com dibo??
www or non www konta better ?
Asole eigula temon ekta difference create kore na SEO te. Tobe non-www seems better to me as it creates more space for optimized URL.
vaiya jodi onek gulo page jemon 4ta ba 6 ta page redirect korte hoy, tokhon ki ae code “Redirect 301 /oldfile.htm http://example.net/newfile.htm” protiti page er jonno alad alada vabe bosate hobe? amar 4 ta page redirect korte hobe ki vabe ki korbo bujhtechina.