Forum Moderators: open

Message Too Old, No Replies

301 Redirects

How do I do a 301 redirect on the same host

         

Alan_G

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

10+ Year Member



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

Laker

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

10+ Year Member



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>

Alan_G

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

10+ Year Member



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

Webwork

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

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Apache/Linux or Windows Server?

Alan_G

11:43 pm on Jul 10, 2008 (gmt 0)

10+ Year Member



Windows and so no .htaccess to help!

bwnbwn

2:50 pm on Jul 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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

Lightguy1

4:25 pm on Jul 14, 2008 (gmt 0)

10+ Year Member



You can do redirects with Helicons Asapi redirect module. I would check that out.

Alan_G

12:58 pm on Jul 15, 2008 (gmt 0)

10+ Year Member



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.

g1smd

9:00 pm on Jul 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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.

aaronjf

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

10+ Year Member



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.

g1smd

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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.

aaronjf

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

10+ Year Member



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.

g1smd

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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

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

aaronjf

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

10+ Year Member



in the context of this discusstion I mean URL. I need to redirect one dynamically generated URL to another dynamically gemerated URL. More clear?

aaronjf

4:53 pm on Jul 30, 2008 (gmt 0)

10+ Year Member



Anybody?

g1smd

9:37 pm on Jul 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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?

Receptional Andy

9:44 pm on Jul 30, 2008 (gmt 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.

aaronjf

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

10+ Year Member



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?

Receptional Andy

11:11 pm on Jul 30, 2008 (gmt 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]