#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    Nova Scotia, Canada
    Posts
    30
    Rep Power
    12

    How does Google treat redirects?


    For anything deeper than the first level of my site, I want to use 'home.php' as the main page rather than 'index.php', so I plan to use the following redirect method for all 'index' pages:

    PHP Code:
    <?php header('Location: http://mydomain/foo/home.php'); ?>
    Will Google not like me for that?
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,314
    Rep Power
    7171
    Google probably won't care much, but you'd be better off just configuring the web server to serve home.php as the index page - saves you the trouble of having to create a bunch of redirect files.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    Nova Scotia, Canada
    Posts
    30
    Rep Power
    12
    Cool. I'll do exactly that.
  6. #4

  7. Join Date
    Jul 2013
    Location
    Melbourne
    Posts
    42
    Rep Power
    0
    Its better you use canonical tags

    Because your domain will also open with example.com and example.com/deafult.php

    so it suggested to use canonical tags also.

    Sample of canonical tags:
    <link rel="canonical" href="http://www.example.com/home.php" />
    Your Business Need More Than Just An Email Id, Protect Your Email Data With Smart Mail Server.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2014
    Posts
    7
    Rep Power
    0
    I agree with peter
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2014
    Posts
    7
    Rep Power
    0
    Use sholud directly chang in DNS Server
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2014
    Location
    Noida, India
    Posts
    3
    Rep Power
    0
    Originally Posted by PeterSullivan
    Its better you use canonical tags

    Because your domain will also open with example.com and example.com/deafult.php

    so it suggested to use canonical tags also.

    Sample of canonical tags:
    I think it will be the best way to notify Google about your desired page to be indexed. By using rel canonical tag Google will get notified to index /home.php only instead of /index.php

IMN logo majestic logo threadwatch logo seochat tools logo