Hi
Would anyone be able to help with 301 permanent redirect please.
I know i can use url redirect, but I am looking how to permanently redirect mydomain.co.uk to www.mydomain.co.uk.
I would like to do this after configuring prefered domain in google.
Thank you
Boran
Probably your best bet would be a text file in your root named .htaccess with the below text:
Redirect / http://www.domain.com/file.ext
with http://etc replaces with wherever you want the domain to end up at. You may need to specify a file to redirect, so with this type of code:
Redirect /index.html http://www.domain.com/file.ext
Try those two out or different variations of htaccess files, they should all work.
Hi Boran,
If you need to move a page or a whole website, a 301 redirect is always recommended. If you just change a file name or delete a page, you my lose search engine rankings that were associated with the old page. By using a 301 redirect, you tell search engines and humans where to find the new page.
Avoid using a meta refresh tag as this is a technique used by search engine spammers to rank well for certain keyphrases that are totally irrelevant from the page redirected to. Many search engines filter out the meta refresh tag, so it is not a search engine friendly option.
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.
Regards,
Marcella Hughes
CHI-Premier Software IT Support