Webconfig setup
-
We're launching a new site for our client on their existing domain, and as many of the URL's are changing we need to create some webconfig redirects.
However, rather than create a webconfig file which redirects each page on the existing site to a corresponding page on the new site, I was hoping to create redirect rules for the top landing pages only, and then have a catch all which redirects all other URL's to the homepage.
How would you set this up in a webconfig file?
-
If you look at tutorials you can copy and paste module with all the hard work done. and then you onlyhave to write the redirects
-
Ok, thanks Alan. I'll nag the devs again.
-
Then i would look at created a ihhtpmoduel, not too hard, i have tutorials on my sites
-
An update on this...
I've tried to create a web.config file containing around 1000 redirects from the old version of an ecommerce site to the new version of the site.
They've kept the same domain, but the URL structure is completely different so really I need all the redirects I've pieced together to be put in place. However, the web.config is too big and breaks the site.
In the interim I'm going to cut down the web.config file until it works, but I this isn't an ideal solution.
Any ideas?
-
I did'nt recomend IHttpModule, although it is a very good way to do it. You can then do all your redirects by code rather then regular expressions, with code I find it easier to do more complicated stuff.
The redirecets you are doing are oldPage to newPage this is fine, but not the best. You may have a incomming link about dogs, that went to a page about cats, now is a chance to point it to dogs. Your links may not have been pointing at the most releative page so just going page to page brings accross any non relevant links. You can do betterbuy getting a link report from SEOMoz and looking at the refereing page and the link text to make the best decision. But with time and effort, it may be the easiest to do as you are doing.
Also using url-rewite model of IIS gives you more flexability than using the location tag as you are doing. You should install it on iis if you can and look at the options it gives you.
-
Thanks for the responses.
OK, so generally you'd try and have a specific redirect in place for all URL's on the existing site.
I understand then that I should create a more comprehensive set of redirects, but I'm unsure about the IHttpModule. What is the reason you've suggested this method as opposed to setting up redirects directly within the web.config using rules like this:
<location path="services.htm"></location>
Thanks again, Matt
-
I totally agree with Alan on this. You really need to look at each individual URL, and 301 redirect to ensure they are in place, page by page. It's a sensitve issue for sure and proceed with caution for sure.
It's also not condusive to 301 all URL's and links to the homepage URL. This doesn't make for a great 'user experience' and can cause confusion to the user visiting the site, looking for the specific material. It can also confuse the hell out of a search engine (where did all those other pages I had index'ed go!)
You might also damage the inbound link quality of pages in place now that have links pointing to it. Sure that would pass on to the main domain URL (losing value of 5-15% in the 301), but it's just not a great strategy tpo blindly 301 everything to the homepage. Alan said it right below - you need to look at the links, inbound anchor text, where it's coming from and redirect to the right page via 301) for the best user end experience.
I would map out all the URL's that are new, and then map out the URL's that correlate to those pages exactly. Then setup the webconfig file to have individual page level 301 redirects and put those into place. He provided a link below to his webconfig file for 301 redirects.
Cheers, Rob
-
I would not redirecet all to the home page, they will be ignored if you 301 redirecet onm mass to the one page.
You really do need to look at each link comming into the siite, look at the link text and the page it comes from and decide a good relevant page to send it to.
For some tutorials on redirecetd using teh webconfig file see my web site
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How to setup an iFrame to be indexed as the parent site
Hi, we are trying to move all of our website content from www.mysite.com to a subdomain (i.e. content.mysite.com), and make "www.mysite.com" nothing more than an iFrame displaying the content from content.mysite.com. We have about 10 pages linking from the home page, all indexed separately, so I understand we'll have to do this for every one of them. (www.mysite.com/contact will be an iframe containing the content from content.mysite.com/contact, and we'll need to do this for every page) How do we do this so Google continues to index the content hosted at content.mysite.com with the parent page in organic results (www.mysite.com). We want all users to enter the site through www.mysite.com or www.mysite.com/xxxxxx, which will contain no content except for iFrames pulling in content from content.mysite.com. Our fear is that google will start directing users directly to content.mysite.com, rather than continue feeding to www.mysite.com. If we use www1.mysite.com or www2.mysite.com as the location of the content, instead of say content.mysite.com, would these subdomain names work better for passing credit for the iFramed content to the parent page (www.mysite.com)? Thanks! SIDE NOTE: Before someone asks why we need to do this, the content on mysite.com ranks very well, but site has a huge bounce rate due to a poorly designed CMS serving the content. The CMS does not load the page in pieces (like most pages load), but instead presents the visitor with a 100% blank page while the page loads in the background for about 5-10 seconds, and then boom 100% of the page shows up. We've been back and forth with our CMS provider about doing something about this for 5 years now, and we have given up. We tested moving our adwords links to xyz.mysite.com, where users are immediately shown a loading indicator, with our site (www.mysite.com) behind it in an iFrame. The immediate result was resounding success... our bounce rate PLUMMETED, and the root domain www.mysite.com saw a huge boost in search results. Problem with this is our site still comes up in organic results as www.mysite.com, which does not have any kind of spinning disk loading indicator, and still has a very high bounce rate.
Technical SEO | | vezaus0 -
How should we setup of a side (slightly off-topic) blog?
Our web application targets small business owners and entrepreneurs. However, the developers at our company have a lot of great content to offer the web development community and so we want to start a "behind the scenes" blog where we can discuss technical topics... JavaScript performance, web accessibility, etc. Our customers and the visitors of our website would probably not be interested this new content... So we want to be careful not to cannibalize or damage our current SEO. What are some of the major risks we should watch out for? If we put it on a subdomain, is that enough to not impact our main site SEO or introduce keyword confusion? Conversely, are there opportunities for this side blog to help the SEO and authority of our main website/domain? Thanks for the help!
Technical SEO | | Bill4Time0 -
UK and US Targeting Simultaneously - Domain Setup and Duplicate Content?
I have a site that will be targeting the US and the UK. However, it will need to display slightly different content to the two. Should I use a .co.uk and a .com, or uk.themainsite.com for the UK, or themainsite.com/UK? This is of course setting up multiple country targeting within Google Webmaster Tools. Am I likely to run into duplicate content issues?
Technical SEO | | james4060 -
Ecommerce website: Product page setup & SKU's
I manage an E-commerce website and we are looking to make some changes to our product pages to try and optimise them for search purposes and to try and improve the customer buying experience. This is where my head starts to hurt! Now, let's say I am selling a T shirt that comes in 4 sizes and 6 different colours. At the moment my website would have 24 products, each with pretty much the same content (maybe differing references to the colour & size). My idea is to change this and have 1 main product page for the T-shirt, but to have 24 product SKU's/variations that exist to give the exact product details. Some different ways I have been considering to do this: a) have drop-down fields on the product page that ask the customer to select their Tshirt size and colour. The image & price then changes on the page. b) All product 24 product SKUs sre listed under the main product with the 'Add to Cart' open next to each one. Each one would be clickable so a page it its own right. Would I need to set up a canonical links for each SKU that point to the top level product page? I'm obviously looking to minimise duplicate content but Im not exactly sure on how to set this up - its a big decision so I need to be 100% clear before signing off on anything. . Any other tips on how to do this or examples of good e-commerce websites that use product SKus well? Kind regards Tom
Technical SEO | | DHS_SH0 -
Questions about root domain setup
Hi There, I'm a recent addition to SEOmoz and over the past few weeks I've been trying to figure things out. This whole SEO process has been a bit of a brain burner but its slowly becoming a little more clearer. For awhile I noticed that I was unable to get Open Site Explorer to display information about my site. It mentioned that that there was not enough data for the URL. Too recent of a site, no links, etc. Eventually I changed the the URL to include "www." and it pulled up results. I also noticed that a few of my page warnings are because of duplicate page content. One page will be listed as http://enbphotos.com. The other will be listed as http://www.enbphotos.com. I guess I'm not sure what this all means and how to change it. I'm also not really sure what the terminology even is and something regarding root domain seemed appropriate but I'm not sure if it is accurate. Any help/suggestions/links would be appreciated! Thanks, Chris
Technical SEO | | enbphotos0 -
Best way to setup large site for multi language
Hello, I am setting up a new site which is going to be very large, over 250,000 products. Most of our customers are in the UK (45%), the rest are from various European countries and the USA. Unfortunately we only have a team of two people writing content for these pages in English. I would value some input on the best way to setup my website structure for ranking. Obviously the best would be individual country oriented domains I.e. domain.fr domain.de domain.co.uk . However we wouldnt have the time to create content for every page and most pages would contain the same content as the English domain. Would I get a penalty for this from google? The second choice is to follow the example of overstock.com and pull in information relating to each country I.e. currency and delivery time. this would be a lot easier but I am concerned that the lack of geo focus would effect my rankings. Does any one have any ideas?
Technical SEO | | DavidLenehan0 -
Setup 301 Redirects
I have been asked to transfer a clients old domain over to a new domain with a new site. All of the inbound links basically go to the homepage, and the few links that dont go to the homepage on the old site, might as well be redirected to the homepage on the new site. I'm wondering is there a "catch all" sort of redirect such as www.oldsite.com/* redirects to newsite.com. So any redirects we havent set up will automatically go to the new site homepage? And secondly, whats the easiest way to the redirects up? Can I just add it as a parked domain or addon domain in cpanel, and do the redirects in there? Or does it needs its own hosting for the old domain with its own htaccess file? Any help appreciated! 🙂
Technical SEO | | timscullin0 -
How to setup tumblr blog.site.com to give juice to site.com
Is it possible to get a subdomain blog.site.com that is on tumblr to count toward site.com. I hoped I could point it in webmaster tools like we do www but alas no. Any help would be greatly appreciated.
Technical SEO | | oznappies0