Welcome to WebmasterWorld Guest from 34.201.121.213

Forum Moderators: ocean10000

Message Too Old, No Replies

301 Redirects

How do I do a 301 redirect on the same host

     
5:35 pm on Jul 10, 2008 (gmt 0)

New User

10+ Year Member

joined:July 2, 2008
posts:18
votes: 0


I have a '.com' and a '.co.uk' TLD pointing to the same IP address on my hosting company's server. Both TLDs work but I realise now, that this is considered duplicate content by Google and that I should use a 301 redirect. But I'm unsure what I have to do. I'm assuming I should create a 'dummy' site for one of them, and then just place 1 page on it that redirects to the other site. Does that seem reasonable?

If so, my concern is, what happens to bookmarks that point directly onto a page within the redirected website? Will they be lost? If they are, do I have to mirror the entire site and have every page being redirected to the corresponding page on the genuine site?

I'm using ASP.NET and so there is no .htaccess file to help with this.

thanks

6:20 pm on July 10, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 25, 2005
posts: 197
votes: 0


Is this a continuation or your earlier post (including other spliced posts) -- or am I missing something?

<http://www.webmasterworld.com/domain_names/3688590.htm>

7:27 pm on July 10, 2008 (gmt 0)

New User

10+ Year Member

joined:July 2, 2008
posts:18
votes: 0


It is a continuation. The other posts answered by question about needing to do 301 redirects. I'm now trying to get my head around how to implement it without b*gg*r*ng everything up.

thanks

9:30 pm on July 10, 2008 (gmt 0)

Moderator

WebmasterWorld Administrator webwork is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 2, 2003
posts:8054
votes: 100


Apache/Linux or Windows Server?
11:43 pm on July 10, 2008 (gmt 0)

New User

10+ Year Member

joined:July 2, 2008
posts:18
votes: 0


Windows and so no .htaccess to help!
2:50 pm on July 11, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member bwnbwn is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 25, 2005
posts:3591
votes: 48


I assume they are the same site so here is what you do.
In IIS open websites
right click the folder of the website your wanting to redirect select properities, then select home directory, check redirect enter the complete url here do not add the / url will look like this http: //www example com then select permanent redirect and hit apply.
Check doman redirect and header to make sure it is a 301 and all the folders should redirect to the correct folder.
check them as well and your done.
IIS is easy once ya get the hang of it.
All the bookmarks will be fine and redirect to the correct url they are bookmarked for
4:25 pm on July 14, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 31, 2008
posts:114
votes: 0


You can do redirects with Helicons Asapi redirect module. I would check that out.
12:58 pm on July 15, 2008 (gmt 0)

New User

10+ Year Member

joined:July 2, 2008
posts:18
votes: 0


Thanks for all the tips. I'm on a shared host with very little access to IIS and so I ended up doing it with code in the ASP.NET app.
9:00 pm on July 15, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Make sure that you have catered for both www and non-www for both domains.

You likely have FOUR combinations that can access your site, and three need to redirect.

8:53 pm on July 28, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 20, 2002
posts: 521
votes: 0


On the same topic... how would you go about redirecting a page that does not exist anymore and had a dynamic ULR to begin with.

IE www.somedomainname.com/s.nl/sc.8/category.240/.f

I redirecting when the page is present seems easy enough, but I have no clue how to do it to this URL.

9:10 pm on July 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Redirecting simply redirects a URL request to a different URL.

The original URL doesn't have to have had a page returned for that old request, and it will not return a page at the old URL once the redirect is in place.

There will need to be a page returned at the new URL though.

10:14 pm on July 28, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 20, 2002
posts: 521
votes: 0


Redirecting simply redirects a URL request to a different URL.

The original URL doesn't have to have had a page returned for that old request, and it will not return a page at the old URL once the redirect is in place.

There will need to be a page returned at the new URL though.

I understand the the concept of redirecting fully. My issue is exactly how do I do a redirect within IIS for a URL that no longer has a page. Everything I found requires there to be a page, then opening the properties of that page, etc etc etc.

11:56 pm on July 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


By "page", do they mean "file", or "URL"? They are two different things.

On the web, "page" doesn't really have a definition.

2:59 am on July 29, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 20, 2002
posts:521
votes: 0


in the context of this discusstion I mean URL. I need to redirect one dynamically generated URL to another dynamically gemerated URL. More clear?
4:53 pm on July 30, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 20, 2002
posts:521
votes: 0


Anybody?
9:37 pm on July 30, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


URLs that are indexed, are those followed from links on pages, so make sure that those links have the correct URL for the content.

I am not sure what you mean by redirect one dynamically generated URL to another dynamically generated URL.

You can only generate a URL once. Your own site should no longer refer to old URLs in any internal links within the site.

Do you mean redirect external requests for a URL that no longer exists to one that now does?

Is there a simple one-to-one mapping of the old and new URLs?

9:44 pm on July 30, 2008 (gmt 0)

Senior Member

joined:Jan 27, 2003
posts:2534
votes: 0


aaronjf: I don't believe it is possible to do what you want to do within a default IIS installation. There are third party rewriting components that would make such tasks much easier.

Otherwise, IMO this is a development problem, rather than a server administration one. Your developers need to capture the query string within your pages and redirect ones that have moved elsewhere.

10:12 pm on July 30, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 20, 2002
posts:521
votes: 0


aaronjf: I don't believe it is possible to do what you want to do within a default IIS installation. There are third party rewriting components that would make such tasks much easier.

Otherwise, IMO this is a development problem, rather than a server administration one. Your developers need to capture the query string within your pages and redirect ones that have moved elsewhere.

Nuts... I was able to do this on Apache no problem.

Receptional Andy: What is the third party solution?

11:11 pm on July 30, 2008 (gmt 0)

Senior Member

joined:Jan 27, 2003
posts:2534
votes: 0


I believe some of the IIS guys swear by IIS Rewrite, which I think is a reasonable approximation of mod_rewrite. It's been a while since I had to do rewriting on IIS. I would do a bit of research on what's out there prior to installing any ISAPI filters though.

Of course, any non-standard install has an impact on portability.

[edited by: Receptional_Andy at 11:11 pm (utc) on July 30, 2008]