Solved

IIS REdirect or webconfig ?

Posted on 2013-06-20
4
659 Views
Last Modified: 2013-06-24
Hello,

I was hoping for a little advice.  We are currently in the middle of a rebrand and will shortly introduce a new URL.  We'll be copying over our current content so it will be exactly the same website under a new URL.

What I was hoping was that someone might be able to advise on is what method of 301 redirect I should be using.    I have read that using page to page redirects is the best method to maintain our Google rankings (we are more or less the first result on a Google search of our key words) and we want to carry over that ranking.

So should I do this with the web.config file to get this 1:1 page match,   or is an IIS domain level redirect suitable or......

many thanks in advance for any replies.
0
Comment
Question by:citymarketing
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Patrick Bogers
ID: 39262976
Hi.,

Quickest and easiest way is to have your old website URL include a index.html with following code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="refresh" content="0;URL=http://www.mynewurl.com" />
<title></title>

</head>
<body>

</body>
</html>
0
 
LVL 23

Expert Comment

by:Tony McCreath
ID: 39265279
@Patricksr1972, The question is about 301 redirects and not meta refresh redirects.

If you are just changing domain and all the page paths are the same then you can do a site wide redirect. But if pages are moving you will have to do each one separately.

web.config is the simplest way to set them up. If you have 100s to do you may find web.config is slow and hard to maintain. Then you will be looking into custom code using the Routing module to handle your redirects.
0
 

Author Comment

by:citymarketing
ID: 39265506
Thanks for your reply tiggerito
We are just changing domain, as you say page paths will be the same.  So perhaps a domain level redirect will suffice.   However,  Google seems to discourage blanket redirects and suggest creating page:page redirects to make the link between old and new domains and maintain page ranking.  We do have several hundred pages and so web.config as you say might be too slow, in fact it would.

We just wanna keep our first returned result page rank on Google and keep our app functioning which runs off our primary domain !
0
 
LVL 23

Accepted Solution

by:
Tony McCreath earned 500 total points
ID: 39267542
For the domain level redirect you want to make sure it does do page to page. By domain level we are saying you create one domain wide command to do all the redirects.

Google does not like you redirecting every old page to a home page, and that's the mistake a lot of people make when setting up a site wide redirect.

You can do a site wide command in web.config or set up the site wide redirects in IIS. Just make sure it does do page to page and is a 301.

This may work:

<rule name="site wide redirect, page to page">
  <match url=".+" />
  <conditions>
    <add input="{HTTP_HOST}" pattern="^www\.old-domain\.com$" />                    
  </conditions>
  <action type="Redirect" url="http://www.new-domain.com/{R:0}" />
</rule>
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question