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
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/
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/
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.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.
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/
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/
No. What I've put above is as simple as it gets.is there not just a simple code i can add to the html?