[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

IIS REdirect or webconfig ?

Posted on 2013-06-20
4
Medium Priority
?
667 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 23

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 1500 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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
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 Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

613 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