Request A Quote

First Name:

Last Name:

E-Mail:

Phone:

Your Domain:

Services Desired:

2 + 2 =  

*Please Enter the Total for 2 + 2 Above (verification)*

Client Testimonails

Our experience with Dewitts Media has been excellent and we highly recommend them. Just after a few months of consulting work with Dewitt Media we began to rise in search engine placement and our traffic grew exponentially. Dewitts Media really does know the secrets of the SEO industry and we will continue to confide in their expertise every step of the way to number 1, which is not far, we are currently number 4 using keyword "printing" on Google.

Neal Sumlin CEO,
Area Printing

Search





Categories


Blogroll

URL Redirects Codes

I currently wrote a post on url redirect in my previous article, but I figured I would go little bit more into depth about this, since 301 redirects can be an important part of search engine optimization, or any one that is in the process of learning seo.
I will go over the following meta refresh redirect, php redirect, asp redirect, coldfusion redirect, javascript redirect, shtml redirects, and give you details on why these are important to the search engines, and why you should use them, another thing that is good about redirects is say that someone adds your link to there website, but they only use yourdomain.com instead of www.yourdomain.com, well if they use yourdomain.com and you have no redirect set then you will not receive any credit with the search engines from it.

Now if you had a 301 redirect that was redirecting yourdomain.com to www.yourdomain.com it will pass all page rank, and juice from other websites. You just never know how many inbound links you got that are pointing toward you thats not using your full domain name, so this can play a vital role in optimizing your site, and is just a plus because there is several factors that come upon search.

301 URL Redirect


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.indianawebsitedesign\.net [NC]
RewriteRule ^(.*)$ http://www.indianawebsitedesign.net/$1 [L,R=301]


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^indianawebsitedesign\.net [NC]
RewriteRule ^(.*)$ http://indianawebsitedesign.net/$1 [L,R=301]

This will redirect indianawebsitedesign.net to www.indianawebsitedesign.net, so all juice will get passed, so your rankings won’t get effected. You should apply this by modifying the httpd.conf file, adding a .htaccess file to the server which is the preferred method if you are using a basic set up as webhosting, noting high end.

Some servers support 301 redirect directly from the control panel I know dreamhost does, and a few others, but if not just use the .htaccess file which there can be several ways of applying this rule. I will get more into .htaccess at the end of this article.

301 URL Redirect for moving domains

Now this is a redirect if you have purchased a new domain, and want to pass all juice, just add this to the .htaccess file as well, make sure that your new server has the same structure in its directories like the same exact paths for certain files, and etc.


RewriteEngine On
RewriteRule ^/(.*)$ http://www.indianawebsitedesign.net/$1 [R=301,L]


RewriteEngine On
RewriteCond %{HTTP_HOST} (.*)\olddomain\.com
RewriteRule ^(.*) http://%1indianawebsitedesign.net/$1 [R=301,L]

PHP Url Redirect

Here is an example of a php url redirect make sure this code is placed before any html, or whitespace on the documents, or else you will get a php error that will say headers already sent, or something similar to that.

header(”location:http://www.indianawebsitedesign.net/index.html”);
exit;
?>

ASP 301 Url Redirect

Please the following code at the top of the page.

RewriteRule ^(.*)$ http://www.indianawebsitedesign.net/$1 [R=301,L] ASP URL Redirect

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.indianawebsitedesign.net/index.html"
%>

Okay lets get into the .htaccess file, basically alls you need to do is create a file called .htaccess, and upload it to the root of your server, and it will take effect on any of the following cdoes you add, well the ones taht are strictly made for the .htaccess, now last time I check yahoo web hosting don’t support the .htaccess file, and I would not recommended using there hosting under any circumstance due to lack of tech support, and capabilities.

Did you like this post? If so subscribe to our RSS feed by clicking here


Comments are closed.