How to do a 301 redirect?

2 replies
  • SEO
  • |
Can someone point me to a simple explanation of how to do a 301 redirect? Thanks.
#301 #redirect
  • Profile picture of the author paulgl
    If you have cpanel, I believe there is a simple type-in setting
    for redirects.

    Another way is via a file called .htaccess

    You probably already have one, or you can just create
    it. It must be in the root folder.

    Then you simple add a line of code.
    (If there are already lines of code there, skip a line)

    I like this one if changing a domain to a new domain:
    redirect 301 /index.html http ://www.domain.com/index.html

    The index.html can be replaced by whatever is the
    extension of your index page, like index.php, etc.
    You can probably get by without an extension on the
    new domain.

    The instructions are the same for redirecting any page.
    The /index.html is the old page, the http ://www.domain.com/index.html
    is the new page. Notice the first only gives the file, not full url.

    (Notice I left a space between the http and : this was to not have the
    thing show up as a link here. You don't want the space in the code.)

    There are numerous other ways.

    My advice is to google it for more info.

    paul
    Signature

    If you were disappointed in your results today, lower your standards tomorrow.

    {{ DiscussionBoard.errors[3613883].message }}
  • Profile picture of the author Brankica
    I will add one thing, in case you are a WordPresd user, there is a simple plugin Redirection, that will do the job for you. Sorry if this isn't completely related to your question. But I have mortal fear from these redirections so I thought a plugin might help (if you use WP).
    {{ DiscussionBoard.errors[3617498].message }}

Trending Topics