Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:43:46+00:00 2026-05-27T03:43:46+00:00

I use IIS 7.5 I have a website wich has a valid host like:

  • 0

I use IIS 7.5

I have a website wich has a valid host like:

A) mysite.co.uk

and a DEFAULT host (using for testing proposes provided by the hosting company):

B) mysite.hosting.com

Website is visible on both address, creating a DUPLICATE CONTENT issue for Search Engine.

I need redirect all the traffic (for all pages) from B to A using a 301 redirect.

IIS7.5 Http Redirect it is not design for this situation so I suppose to use IIS 7.5 Url Rewrite Module.

My questions: how write the ROLE in my web.config? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:43:47+00:00Added an answer on May 27, 2026 at 3:43 am

    Try adding something like this between the <System.webServer> tags in your web.config:

    <rewrite>
        <rules>
            <rule name="Redirect mysite.hosting.com to mysite.co.uk" patternSyntax="Wildcard" stopProcessing="true">
                <match url="*" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="mysite.hosting.com" />
                </conditions>
                <action type="Redirect" url="http://mysite.co.uk/{R:0}" />
            </rule>
        </rules>
    </rewrite>
    

    Alternatively, you can do this using global rules by adding:

    <rewrite>
        <globalRules>
                <rule name="Redirects to mysite.co.uk" patternSyntax="ECMAScript" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAny">
                    <add input="{HTTP_HOST}" pattern="mysite.hosting.com$" />
                </conditions>
                <action type="Redirect" url="http://mysite.co.uk/{R:0}" />
            </rule>
        </globalRules>
    </rewrite>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two IIS servers running using NLB. Unfortunatelly I cannot use shared session
I have a website that has a number of URLs that people use to
I have configured my website from VS2010 to use IIS 7.5. Then I added
I have a website setup to use two different bindings in iis. When visiting
I have recently configured IIS 7.5 to use the SMTP server. Now, I have
I have web service, which use integrated security in IIS. Now, I want to
Since, for various reasons, I can't use IIS for an ASP.NET website I'm developing,
I have a website in IIS 7, ASP.NET 3.5 which works well. I have
I have a website running on IIS 7 bound to port 80 with 2
I have a website in IIS 6, let's call it WebSite1. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.