WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Search Engines > Search Engine Optimization Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Search Engine Optimization Forum SEO is much easier with help from peers and experts! The WebProWorld SEO forum is for the discussion and exploration of various search engine optimization topics. Any non (engine) specific SEO or SEM topics should go here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-17-2006, 11:45 AM
WebProWorld Member
 

Join Date: Feb 2004
Location: Stupid question. At my PC.
Posts: 99
TechEvangelist RepRank 0
Default Standardizing URL on ASP.NET Site

I'm providing SEO advice to a new client who has a corporate Web site built using ASP.NET. I am a classic ASP and PHP developer, but have not worked with ASP.NET. One of the problems I found is that the search engines have indexed the site under two versions of the URL, one with and without the www subdomain. That's a common problem. The secondary issue is that the home page can be reached using 4 variations of the URL, as in:

http://www.domainname.com/
http://domainname.com/
http://www.domainname.com/app/ (home page actually resides here)
http://domainname.com/app/

Is there an ASP.NET developer that knows the best way to deal with this issue on this platform? I know I need a 301 redirect routine to standardize the URLs to http://www.domainname.com/.

This is a common problem that is easily resolved on Unix and Linux servers using .htaccess, but I have not found a similar solution for ASP.NET sites. ASP.NET does have a built-in URL rewriting routine (it's about time) that looks like it uses an XML file for the rewrite, but I have not found a reference to a site-wide 301 redirect or a method to force standardization of the URLs. I'm looking for a recommendation for the best way to deal with this issue with ASP.NET.
__________________
Facts are meaningless. They can be used to prove anything. - Homer Simpson
MySQL Cheatsheet :: Arizona SEO training
Reply With Quote
  #2 (permalink)  
Old 02-17-2006, 12:52 PM
rumblepup's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jul 2003
Location: Miami, Florida
Posts: 323
rumblepup RepRank 2
Default

Not a coder, but I think I can help.

In the asp.net web.config file, which is a global file to your application that will set a predefined set of settings, you can actually state a set of rules for IIS to follow on how to handle the url. It's part of the asp.net engine. You can change mysite.com/app.aspx?topic=13 to mysite.com/bluegrass/13/default.aspx and so forth. However, I don't think that dynamic content is a problem for SE's anymore. I know your problem has a resolution, but since I'm not a coder, I can't exactly point it out.

HOWEVER, I can point you to some references.

asp.net - this is the online community website for asp.net
aspnet.4guysfromrolla.com/1.x/ - articles and resources
www.dotnetjunkies.com/- another resource.

Hope this helps a little.
Reply With Quote
  #3 (permalink)  
Old 02-17-2006, 01:11 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

I'm not an asp.net guy :)

However, I have seen the following code you could try
Code:
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.somedomain.com");
}
</script>
-
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #4 (permalink)  
Old 02-17-2006, 05:49 PM
WebProWorld Member
 

Join Date: Feb 2004
Location: Stupid question. At my PC.
Posts: 99
TechEvangelist RepRank 0
Default

Thanks for the help with this thus far.

Cyanide, I did find the script that you posted, but that looks like a page level script. I'm really looking for a site-wide solution similar to mod_rewrite in Apache's .htaccess file. All three of the secondary versions of the URL need to be converted to the primary URL using a 301.

I know our world is dominated by PHP and classic ASP, but there has to be an ASP.NET developer out there who knows how to do this.
__________________
Facts are meaningless. They can be used to prove anything. - Homer Simpson
MySQL Cheatsheet :: Arizona SEO training
Reply With Quote
  #5 (permalink)  
Old 02-17-2006, 06:55 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

ahh, I see...

Well for the home page being in the app folder...
- any chance it can be moved into the root directory?
That would solve half your problem.
I see linux/apache sites doing this all the time, and I always encourage them to move it.
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #6 (permalink)  
Old 02-17-2006, 09:37 PM
WebProWorld Veteran
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 467
Keimos RepRank 0
Default

Hi TechEvangelist,

Its not a coding thing, as Cyanide has pointed out, why are you complicating things.

http://www.domainname.com/
http://domainname.com/

are the same domain or address as are

http://www.domainname.com/app/ (home page actually resides here)
http://domainname.com/app/

Are these all repeats of the same page? Have to ask!!

home page should reside in the root folder.

Basically you are overcomplicating things. KISS

Keimos
__________________
Keimos IT, Just helping you to get better!
www.keimos.co.uk , www.keimos.net , www.selfpacedit.co.uk ,www.earn_online.veretekk.com
Reply With Quote
  #7 (permalink)  
Old 02-18-2006, 08:56 AM
WebProWorld Member
 

Join Date: Feb 2004
Location: Stupid question. At my PC.
Posts: 99
TechEvangelist RepRank 0
Default

I understand the comments and appreciate the help. I didn't design the site. For some reason, problems with unusual site architectures are common with ASP.NET sites. I can't explain why this is, but I have seen ASP.NET site stuctures that are much more bizzarre and illogical than this.

I completely agree that the home page should be in the root directory, and I do plan to make that recommnedation. I can't explain why some developers place it elsewhere. It doesn't make sense to me either.

My question is related to the best method to use to set up the 301 redirects. I can't find any information as to how to do this properly with ASP.NET. I will recommend a page level 301 redirect for the copy of the home page in the subdirectory.

The problem I still have to resolve is related to using a 301 redirect to eliminate the versions of the URLs without the www subdomnain in the search engines. I thought that this should be done with ASP.NET's internal URL rewrite program. If I cannot find a solution along these lines, I plan to recommned the old workaround that requires two sites to be set up on the server. One is the main site using http://www.domainname.com. The other site is set up using http://domainname.com and is set up in IIS as a permanent redirect to http://www.domainname.com. No Web pages actually exist on the second site because IIS redirects all the traffic.

Does anyone know of a solution using ASP.NET's internal URL rewrite program?
__________________
Facts are meaningless. They can be used to prove anything. - Homer Simpson
MySQL Cheatsheet :: Arizona SEO training
Reply With Quote
  #8 (permalink)  
Old 02-18-2006, 01:35 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

Does the client have control over the server?
Or maybe the host can be queried?

In IIS
Quote:
Go into Internet Services Manager, right click on the file or folder you wish to redirect. Select the radio titled "a redirection to a URL". Enter the redirection page, check "The exact url entered above" and the "A permanent redirection for this resource", then click "Apply".
Grasping at straws :)
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #9 (permalink)  
Old 02-19-2006, 10:41 AM
incrediblehelp's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default

TechEvangelist have you looked into ISAPI rewrite?
Reply With Quote
  #10 (permalink)  
Old 02-19-2006, 09:19 PM
TheGarty's Avatar
WebProWorld Member
 

Join Date: Jan 2006
Location: Western Australia
Posts: 50
TheGarty RepRank 0
Default

I dont see why this really matters???

All you have to do is make sure that all the links to the site from external sources, and internally in the website, are to the same link.

Then it really doesnt matter, does it?

Also, depending on the way the site works, you could replace the files in whatever the directories are and do 301 redirects to the page you want?

My advice is to ignore the pages you dont want, and concentrate on the ones that you do.
Reply With Quote
Reply

  WebProWorld > Search Engines > Search Engine Optimization Forum
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0