PDA

View Full Version : IIS 4.0 + Search Engine Friendly URL's



Stevens
02-02-2004, 12:37 PM
I read the articles featured here about Search Engine Optimization, but most of them dealt with Apache's capabilities. Are there any tips and tricks that would give the same outcome...SEO-friendly URL's...for Microsoft servers? At the momoent I am using the standard "...?var=info" format to sent requests to MySQL.

Also, what is the best way to give links to outside resources without punching "holes" in my website? Will redirectors work?

ERIC

flyingpylon
02-02-2004, 02:52 PM
IIS is sorely lacking in this department. I still can't believe that even with IIS 6.0 they don't have functionality equivalent to .htaccess or mod_rewrite.

If you have the ability to install ISAPI extensions on your server (you probably don't if you're on a shared host) then there are a few different choices. One is URL Replacer http://www.pstruh.cz and another is called Mod Rewrite 2 http://www.iismods.com. I think there are others as well.

If that's not an option, you can create a custom 404 error page. You make your links go to directories or files that are search engine friendly but don't really exist. The 404 page parses the requested URL for parameters you've defined and loads the appropriate content. With IIS 5.0 you also have the option of specifying a different page via Server.Execute or Server.Transfer.

Another option with a 404 page is to parse the URL but then call another page via the WinHTTP object or the ServerXMLHTTP object. This will be a little slower, but it will allow you to specify querystring parameters when calling the page which Server.Execute and Server.Transfer will not. However, I'm not sure if this is possible with IIS 4.0.

I'm not really sure what you mean in your second question.

Stevens
02-02-2004, 02:59 PM
Chris wrote the analogy of links leading to your site to be water filling a bucket, and links away from your site as holes letting the water out. Is there any way to link to outside URL's without hurting SE rating?

Chris
02-02-2004, 03:23 PM
Link it through a redirect script.

You can make a database of outgoing links and reference them by a numeric primary key.

http://www.example.com/exit/out.asp?id=389

So out.asp is loaded, then it scans the database for link 389 and then forwards the person to the new url.

Then you add a robots.txt file to your site that blocks search engines access to the exit directory.

dolphin
02-02-2004, 03:28 PM
I've had this problem before.

Ive noticed that the 404 error page method will not get your page index by Google (well I waited for 2 months and it didn't index me, most other pages got index in about 1-2 weeks).

Another method that I have used is by using the ISAPI_REWRITE method (http://www.isapirewrite.com) and it works a treat.

Dolphin

flyingpylon
02-02-2004, 05:51 PM
Originally posted by dolphin
Ive noticed that the 404 error page method will not get your page index by Google (well I waited for 2 months and it didn't index me, most other pages got index in about 1-2 weeks).

That might be true if you used the 404 page to do a Response.Redirect or something. But if done properly, there is no way for Google to tell that the requested page does not really exist. It requests a URL, content is returned with an HTTP status of 200, and that's it. Just like a normal page.

Regarding outgoing links, I believe that you can also just provide the destination URL as a parameter. So using Chris' example, it would be out.asp?url=http://www.domain.com

Stevens
02-03-2004, 07:37 AM
I'd rather not go with sending all my visitors to 404 pages. I'd rather just wait until MS comes up with something or I can find another way. That just sounds like a mess that I don't want to clean up later. I'm also not on my own server so having access to all the config files is a no-no.

Is out.asp a native script, or do I need to write the contents of it. If so, what belongs there? Also, it looks like the latter method with the URL in the link request wo't work because it doesn't block the SE's from following them. Can someone confirm this?

Chris
02-03-2004, 07:52 AM
Its a script you write.

inside it you just call up the url from the database and then do a redirect, I'm not sure how to do it in ASP but in php its

<?
header("Location: http://www.example.com");
?>

Stevens
02-03-2004, 08:03 AM
Hey Chris, what were you saying about blocking SEs from hitting the redirects. What would I need to put into scripts that allow this? I wouldn't do it in .asp anyway. I'm gonna stick to .php in case I want to move to an Apache server.

Also I haven't seen a thread yet about relational databases and how to access them through PHP and MySQL so I'm gonna start one...

flyingpylon
02-03-2004, 11:50 AM
I'd rather just wait until MS comes up with something

I believe there are ways to do this with ASP.Net. But if you're stuck with IIS 4.0 then I don't believe that's an option. I'm not sure you're understanding the 404 option completely, but if you don't want to do it, that's your choice.

Regarding the outgoing links, what you need to do is use the robots.txt file to block search engines from following links through your outgoing link processing script (out.asp or out.php or whatever you decide to call it).

Stevens
02-03-2004, 12:06 PM
I already have my site pretty much up and running with regular "...?var=info" links to all my pages. I'm just trying to optimize. Would it take too much effort and construing to implement the whole 404 error tecnuique??? Would going back require too much?

Kings
02-03-2004, 12:17 PM
Originally posted by Chris
Its a script you write.

inside it you just call up the url from the database and then do a redirect, I'm not sure how to do it in ASP but in php its

<?
header("Location: http://www.example.com");
?>
<%
Response.Redirect "http://www.example.com"
%>:)

Stevens
02-03-2004, 12:55 PM
What's that mean, Kings? I'm an idiot, you gotta break stuff down Barney-style...

Kings
02-03-2004, 01:27 PM
Originally posted by Stevens
What's that mean, Kings? I'm an idiot, you gotta break stuff down Barney-style... It's the ASP equivalent of Chris' PHP code.

For your out.asp file you'd probably do something like this:
<%@ Language=VBScript %>
<%
Response.Redirect Request.QueryString("url")
%>and then you can use out.asp?url=http://www.somesite.com.

dolphin
02-03-2004, 08:51 PM
Here is the tutorial I used for the 404 redirect method

http://www.asp101.com/articles/wayne/extendingnames/default.asp

have fun :)