I digital forum members..I just trying using the search function to find out about 301 redirect..but no one related to my problem.. I try to redirect my old address http://bentdaniel.com to http://www.bentdaniel.com. the problem is...once I download the .htaccess this following code already exist: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Most of the tutorial in this forum just give the code like this: RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC] RewriteRule ^(.*)$ http://www.yourdomain/$1 [R=301,L] I try the code..I put it at upper and down and erase the existence code but that didn't work..can anyone SEO expert help me..?
Hello, In your .htaccess file put the following (after leaving one line of free space): redirect 301 http://bentdaniel.com/ http://www.bentdaniel.com/ ---------------- Should do the trick. But I don't even know if you can do a 301 on a non-www to a www
RewriteEngine on RewriteCond %{HTTP_HOST} ^http://bentdaniel\.com$ [NC] RewriteRule ^(.*)$ http://www.bentdaniel.com/$1 [R=301,L] Code (markup): Insert the above code just before the </ifmodule> tag.
I just insert the code just before the </imodule> tag but nothing change at all..my address still remind display my old URL. P/s: I'm using linux server (I think that is no problem here).
What registrar have you used to register your domain? Many registrars will allow you to manage redirects from their own control panel instead of you having to manipulate the code on your website. That would be my advice. Don't mess with your website code, instead create the redirect at the registrar level. I am able to do this with cheap-domainregistration.com, and godaddy is the same way. What is your registrar? I would be surprised if you don't have this option there.
Yeah, he can do that. But he is 301ing his domain minus the www to go to his domain with the www. No registrar can do that.