Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
Results 1 to 6 of 6

Thread: 301 directs?

  1. #1
    yourdj's Avatar
    Join Date
    Jan 2008
    Location
    The New Forest
    Age
    43
    Posts
    7,110

    Default 301 directs?

    Can anyone tell me in plain english how to set up a 301 redirect on a root directory using HTML?

    Its all gobbledegoop online and i am sure it is not that difficult?

    Thanks
    Your DJ - Mobile DJ The New Forest, Southampton & Hampshire. Toby
    https://yourdj.co.uk/

  2. #2
    Web Guru Marc J's Avatar
    Join Date
    Feb 2007
    Location
    Edinburgh
    Posts
    3,340

    Default

    What exactly is it you're trying to do, and for what reason?

    I usually do 301 redirects using .htaccess, you don't touch the HTML of the page(s).

  3. #3
    yourdj's Avatar
    Join Date
    Jan 2008
    Location
    The New Forest
    Age
    43
    Posts
    7,110

    Default

    Quote Originally Posted by Marc J View Post
    What exactly is it you're trying to do, and for what reason?

    I usually do 301 redirects using .htaccess, you don't touch the HTML of the page(s).
    Redirect the pages on my site that I do not need/use to the index.

    Basically a way of keeping them as they rank well on google but make them redirect to another page.

    this is what I have but do not understand what it means:


    So, how do you do a 301 Redirect? It's actually quite simple on a website using a Unix server:

    1. Locate or create a .htaccess file on your server. Your .htaccess file gives search engine robots instructions on security and redirects.

    2. If you don't have an .htaccess file on your server, you can easily create one using a text file. Name it ".htaccess"

    3. If there is already an .htaccess file scroll down past the code that is already there and begin your new redirect instructions.

    4. Put in your redirect information, which should look like this:

    redirect 301 /directory/file.html http://www.domainame.com/directory/file.html

    *Note: The first part "/directory/file.html" is the location of the file being moved and the second part "http://www.domainame.com/directory/file.html" is where the file is being moved.

    5. Upload the file to your server.
    Your DJ - Mobile DJ The New Forest, Southampton & Hampshire. Toby
    https://yourdj.co.uk/

  4. #4
    Web Guru Marc J's Avatar
    Join Date
    Feb 2007
    Location
    Edinburgh
    Posts
    3,340

    Default

    Quote Originally Posted by yourdj View Post
    Redirect the pages on my site that I do not need/use to the index.

    Basically a way of keeping them as they rank well on google but make them redirect to another page.
    Well, you don't use a 301 redirect for that.

    The 301 error code is a "Moved Permanently" error, which basically tells search engines "what used to be here....is now at xxxxxxxxxxx".

    You use it when you change your site design, structure or URL convention, or when you change your domain. The page redirected to should, content-wise, be pretty close to what was indexed at the old location.

    A 301 is NOT for somehow trying to keep a pages ranking even although it doesn't actually exist anymore. Just ger rid of the page - a 404 error will be served and the result will eventually be gone from Google.

    this is what I have but do not understand what it means:

    So, how do you do a 301 Redirect? It's actually quite simple on a website using a Unix server:

    1. Locate or create a .htaccess file on your server. Your .htaccess file gives search engine robots instructions on security and redirects.

    2. If you don't have an .htaccess file on your server, you can easily create one using a text file. Name it ".htaccess"

    3. If there is already an .htaccess file scroll down past the code that is already there and begin your new redirect instructions.

    4. Put in your redirect information, which should look like this:

    redirect 301 /directory/file.html http://www.domainame.com/directory/file.html

    *Note: The first part "/directory/file.html" is the location of the file being moved and the second part "http://www.domainame.com/directory/file.html" is where the file is being moved.

    5. Upload the file to your server.
    Those instructions are fine, and pretty straight forward imho. I still say you shouldn't be using a 301 though.

  5. #5
    yourdj's Avatar
    Join Date
    Jan 2008
    Location
    The New Forest
    Age
    43
    Posts
    7,110

    Default

    Quote Originally Posted by Marc J View Post
    Well, you don't use a 301 redirect for that.

    The 301 error code is a "Moved Permanently" error, which basically tells search engines "what used to be here....is now at xxxxxxxxxxx".

    You use it when you change your site design, structure or URL convention, or when you change your domain. The page redirected to should, content-wise, be pretty close to what was indexed at the old location.

    A 301 is NOT for somehow trying to keep a pages ranking even although it doesn't actually exist anymore. Just ger rid of the page - a 404 error will be served and the result will eventually be gone from Google.



    Those instructions are fine, and pretty straight forward imho. I still say you shouldn't be using a 301 though.
    I would imagine that a 404 would be a negative thing as it is not good for the user if they are redirected to a page with nothing on?

    I understand that it will not last for ever and will be re-cashed but some pages remain in the goggle for years.

    I would rather have it redirected to the index which is very similar.

    is there not just a simple code i can add to the html?
    Your DJ - Mobile DJ The New Forest, Southampton & Hampshire. Toby
    https://yourdj.co.uk/

  6. #6
    Web Guru Marc J's Avatar
    Join Date
    Feb 2007
    Location
    Edinburgh
    Posts
    3,340

    Default

    Quote Originally Posted by yourdj View Post
    I would imagine that a 404 would be a negative thing as it is not good for the user if they are redirected to a page with nothing on?

    ...

    I would rather have it redirected to the index which is very similar.
    In that case point 404 errors to your home page. Has the same end result for the visitor, but isn't trying to fool search engines that the content they previously indexed has moved when it has actually gone. Follow the above instructions, but all you need to add to the .htaccess file is: -

    ErrorDocument 404 http://www.domainname.com/

    is there not just a simple code i can add to the html?
    No. What I've put above is as simple as it gets.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •