4 replies
Hi,

for SEO pourposes, i want to name my main site "keyword.html" rather than "index.html".

I read this could be done with a php-redirect like this one:


Code:
<?php 
header("HTTP/1.1 301 Moved Permanently"); 
header("Location: hxxp://mydomain.com/keyword.html"); 
header("Connection: close"); 
?>
Regarding to what i have read, i just put an index.php filled with the code above in my Document Root.

Is this the best method? Sure that google will not punish me in any way?

Thanks for your help.
#php #redirect #seo
  • Profile picture of the author zoobie
    you don't always need a redirect. If your page is indexed and you have been building links then you need a redirect otherwise forget it.

    and you don't need a php redirect for this case since you are renaming your old html to new html file do this instead with a .htaccess file

    Redirect 301 /index.html /keyword.html
    but this will move your index page to a web page called keyword.html.
    and why you want to do that? As the index page always has the most weight out of it?
    {{ DiscussionBoard.errors[821245].message }}
    • Profile picture of the author mschiemann
      Originally Posted by zoobie View Post

      and why you want to do that? As the index page always has the most weight out of it?
      So for SEO, its not useful to do this? Sounds logically that the index page always has the most weight - seems i read a bit to much

      Thank you for clearing this up for me.
      {{ DiscussionBoard.errors[821293].message }}
  • Profile picture of the author QuadRider
    As long as you are using 301 redirects you should be fine SEO wise.

    it is 302 redirects that start getting tricky and can get you into trouble.
    {{ DiscussionBoard.errors[821548].message }}
    • Profile picture of the author som3on3
      Use htaccess with 301 redirect.
      {{ DiscussionBoard.errors[834721].message }}

Trending Topics