Posts Tagged ‘ 301 redirect ’

How to Set Up 301 Redirects in HostEase

December 19th, 2011  in Web Hosting No Comments »

Redirects allow you to make a specific web page redirect to another page and display the contents of that page, which is benefit for both search engine and website management. Therefore, as a website designer, we should be familiar with this function. In fact, some website owners may know how to use 301 redirects while some do not know how to use it. Today I will share with you about this feature.

i.Achieve this function in cPanel
Firstly, log in your cPanel. Go to “Redirects” under “Domains” column. Click it and then you can set 301 redirects here. Please note that there are two types of redirects, permanent redirects (301) and temporary redirects (302). The difference between them is: the permanent redirect will notify the visitor’s browser to update any bookmarks that are linked to the page that is being redirected, while temporary redirects will not update the visitor’s bookmarks. People may choose permanent one at most cases. Now, let’s come to the point. You need to fill in with the domain which you want to make 301 redirects, and also the domain you want it redirects to. Then choose one condition of the three listed as following—only redirect with www, redirect with or without www. and do not redirect www. After this, click “Add” button, and now a 301 redirects would be set up successfully.

ii. Set up the redirects via .htaccess file
Go to the root directory of your website contents hosted, and type such code to .htaccess file under this directory:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
Then save it. In this way, a 301 redirects can also be achieved.

In a word, 301 redirects is a effective way for your website when you plan to move your website or change the domain of your website. Hope this can be helpful to you.

301 Redirect a Useful Method

February 1st, 2011  in Domain Name 13 Comments »

Many webmasters may have used 301 Redirect which is regarded as one of the most useful function on website management. It’s the most efficient and Search Engine Friendly method for redirection. If you want to redirect one site or page to another, 301 Redirect must be a safe way. The code “301″ has its specific meaning, which is interpreted as “permanently”. Obviously 301 redirect is used to indicate that a page has permanently moved.

Suppose I have a several years old domain with high rank and a lot of quality back links. Now, I want to change the old domain name to a new one that I just registered. If I just change the domain name without any other steps, all I have done before will be wasted. So how to automatically redirect to a new domain when visitors link to the old domain? I think 301 Redirect can do me much favor. If I create a 301 redirect from old domain to new domain, the outcome would be different. That is because all valuable traffic will be transferred to the new domain.

How to create a 301 redirect? In CPanel, there is a button named Redirects which is the entrance for creating 301 redirects, maybe it’s the easiest way on redirection in HostEase’s server. Generally, we need choose 301 or 302 when we create Redirect. Comparing with 301, the code “302” means “temporary”.

In addition to this way, adding codes in .htaccess file in web server is another way to implement 301 Redirect. The codes are shown as following.

CODE:
Redirect 301 /old.html http://www.domain.com/new.html

These codes show that once someone visits the old.html page, it will automatically be redirected to new.html page. Please note the format; the former path is relative while the later is absolute. Don’t confuse this two.

Another way is to use Mod_Rewrite for 301 Redirect. Sometimes, you may want to change a new domain for your website. However, you don’t want to waste the traffic and PR value of your old domain.Then you can use this way to make it in .htaccess file.In this way, you can make full use of the traffic and PR value of your old domain so that it’s not wasted.

CODE:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

These codes make all traffic to olddomain.com be redirected to newdomain.com. That’s so helpful for site’s rank.

It’s convenient to create 301 redirects on our server, dear friends, do you want to have a try?

A Complete Guide to Create 301 Redirects in htaccess

June 13th, 2010  in Experience Sharing 347 Comments »

Basics about Web Page Redirect

On a website, redirect is a technique for moving visitor from one web address to another different web address. There are many different reasons that a website may need redirect.

a)The website is at a similar but distinctly different domain name
b)Two websites are merging into one page
c)There is a completely new address for the website

For example, if a company has just changed its named then they would like to turn their visitors as well as customers to their new web page with the new name included.

These days, with the popularity of online affiliate marketing, web users often encounter redirection when they visit a selling link. This is because an affiliate link that looks long and scary is not friendly for online promoting. It is a common practice that the affiliate redirects an affiliate link to another friendly looking URL with the purpose of hiding the fact that they are sending a user to an affiliate offer.

If you have the necessity to redirect your webpage for whatever reason, this article is written for you. In this article, we will introduce the most efficient method for webpage redirect, 301 redirect, to help you out.

What is 301 redirect?

When redirecting a web page to another, one critical issue is to make sure the high search engine rankings with that page will not lose after the redirection. A 301 redirect is just this type of redirection, which allows you to preserve your current search engine rankings when redirecting web pages. 301 redirect is different from 302 redirect and it is a method to move your web pages permanently and there will no longer be any connection between the old address and the new URL address. You implement the 301 redirect by creating an .htaccess file (check with your hosting provider if they provide).

What is an .htaccess file?

In web servers (usually Apache), .htaccess is the default name of a directory-level configuration file that allows decentralized management of web server configuration. An .htaccess file is a simple ASCII file, such as you would create through a text editor like NotePad or SimpleText. The .htaccess file contains specific instructions for certain requests, including security, redirection issues and how to handle certain errors. When a visitor or a spider make a request to your web page via any method, your web server need to check an .htaccess file firstly. Any changes made in .htaccess files will take immediate effect.

How to Implement a 301 redirect for static pages?

First of all, you need to check whether there is an .htaccess file in the root director of your server or not. If you have not found the .htaccess file, open notepad or similar application to can create a file, then name and save it as .htaccess.

If you already have an .htaccess file with some lines of code there, you simply need to download it to your desktop for editing. You should not make any changes to the existing codes unless you are familiar with the functions of the file.

Scroll down past all the existing code, leave a line space, and then create a new line to place the following code:

redirect 301 /old/old.htm http://www.you.com/new.htm
Save the file and then upload it to the root folder of your server. Turn on your browser and enter the old address of your web page you will find out that it is redirected to your new address. Congratulations to you!
Notes: Be sure that the old path of your webpage here start from the top level of your website to the old page, you should not add “http://www” at the beginning of your old address. In addition, you should keep a single space between the following three elements:
redirect 301
/old/old.htm

http://www.you.com/new.htm

How to Implement a 301 redirect for dynamic pages?

Different from the normal static web page, a dynamic page can change every time it is loaded (without you having to make those changes) and they can change their content based on what users does, such as clicking on an image or something else. Dynamic web pages usually generated by a database driven application, such as blog or forum software. That means that the web page will grab information from a database and inserts that information into the web page every time it is loaded. When looking for the URL address of a dynamic web page, you will see that there is a file name appended by a query string, similar to the following:

http://www.example.com/page.php?id=13

If there is a query string in your old URL address, we can say that your web old web page is a dynamic one. If this is the case, then the above 301 redirect solution for static web pages will not fit your purpose. Instead, you are required to use a rewrite solution. Take the above address page.php?id=13 for an example, you will need to all following codes in your htaccess file:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=13$
RewriteRule ^/page.php$ http://www.example.com/newname.htm? [L,R=301]
Please remember to replace the above the id=13 with the query string of the page you wish to redirect and also replace the page.php with the name of your file prior to the query string.

How to Implement 301 redirect for file names with spaces?

Once I had take over a website that built by someone who really not good at his job. I found out that most of the web pages had file name with space, such as “Ticket Order Form.htm”. I would like to redirect these old pages to the new, properly named pages, then I got into trouble with a standard redirect 301 codes. Fortunately, I finally got it function perfectly when someone telling me to use quotes around the original file path. Well, it should look like:
redirect 301 “/old page.htm” http://www.example.com/newpage.htm
How to Implement 301 redirect for the entire website?
If you have found an ideal new domain name for your company and expect to make advantage of the new domain name because it is so wonderful, then you can simply redirect the entire website by adding the following code to .htaccess file.
redirect 301 / http://www.you.com/
The first slash “/” implies that everything from the top level of the site down will be redirected. If you are going to use the same paths and filename as the old one, it is fairly easily to achieve your purpose with this method.

Please not forget to have the trailing “/” on the destination URL, or it may not function correctly. Also, when redirecting a domain name with 301 redirect, you are recommended to leave the old domain name and files in place for a few weeks to give the search engines time to index your changes.

Do you need to make any redirection for your web pages? It is not that hard as you imagine, isn’t it? You can finish the whole process of redirects within a few seconds if your hosting provider offers you with cPanel hosting and .htacess file.