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
-
Our site recently switched from http to https. Do I still need to setup a redirect for the incoming links pointing to http?
Our site recently switched from http to https. If you type in the http://www.websitename.com then it will automatically go to https://www.websitename.com ... my question is... do I still need to create a redirect in the htaccess file to ensure we don't lose all the links currently pointing to the http version of the website?
Technical SEO | | ninel_P0 -
Blogger /blog Folder level redirect setup using .htaccess
We have a blog currently powered by the free blogger.com website. We have set it up as blog.example.com we wish to seti it up as example.com/blog how can we do this using .htaccess file? we understand how to update htacess, but we don't know what code we should enter to achieve what we want our website is hosted on Apache servers with plesk control panel
Technical SEO | | Direct_Ram0 -
How do I setup sitemaps for an international website?
I am adding translated versions of my sites to a subdomain for example es.example.com. Will I add each subdomain into Google Webmaster Tools? Will each need its own sitemap?
Technical SEO | | EcommerceSite0 -
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 -
Mobile Domain Setup
Hi, If I want to serve a subset of pages on my mobile set from my desktop site or the content is significantly different, i.e. it is not one to one or pages are a summarised version of the desktop, should I use m.site.com or is it still better to use site.com? Many thanks any help appreciated.
Technical SEO | | MarkChambers0 -
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