Forum Moderators: open

Message Too Old, No Replies

ASP.NET, postbacks, webparts, 302s and SEO

Lets talk about this

         

ogletree

4:11 pm on Aug 9, 2007 (gmt 0)

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



I am working with a site that is done in ASP.NET 2.0 that is using webparts and postbacks. Here is a list of the problems I see with this.

1. All pages return a 302 instead of a 200
2. Huge page size with tons of on page js code
3. very long hidden viewsate codes

Have others tried to do SEO for a site like this? Can a site make it in Google if every page returns a 302 code instead of a 200? Is there a way to fix these problems without practically redoing the whole site?

pageoneresults

4:55 pm on Aug 9, 2007 (gmt 0)

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



Have others tried to do SEO for a site like this? Can a site make it in Google if every page returns a 302 code instead of a 200?

I just went through this process myself, in the past 90 days. What a nightmare!

There is a time and place for 302s. If your site is assigning a session ID, which it sounds like it is, then the 302 is for the human UA only. The bot UA is most likely getting a 200 without the session ID.

Is there a way to fix these problems without practically redoing the whole site?

I found out after building six (06) sites on the ASP.NET platform over the past 12-16 months just how complex it is for one, and how many different ways there are to get to the same result. It all comes down to the skills of the programming team.

If they used the default behaviors and the drag and drop .NET interface, you have a tough road ahead of you. The code bloat generated by the .NET WYSIWYG is off the charts.

You can hide the VIEWSTATE stuff. There are all sorts of ASP.NET articles around the net and I believe we also have some forum library topics that deal with it.

I agree, it can be a very daunting environment. Once you get the hang of it, and know what features to avoid, it starts to click.

There are times when I wish I was a programmer too. Some of this stuff I'm getting is not something I think I'd do. I am slowly working on trimming out all the fat. Naming conventions can become a nightmare too when using the .NET default stuff. I've had code delivered to me with ID's that were 140 characters long separated by 8-10 underscores. That is absolutely uncalled for!

"Don't you ever, ever, ever, (that's three (03) ever's) deliver anything like that to me again. If you do, YOU ARE FIRED!, got that?"

We've eliminated most postbacks where we could. Those things are great to prevent indexing of whatever is behind one.

ogletree

5:16 pm on Aug 9, 2007 (gmt 0)

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



The bots are getting a 302. I used an online header checker which works just like a bot to find out the code.

pageoneresults

5:29 pm on Aug 9, 2007 (gmt 0)

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



What's the URI that the bot is getting and what is the URI that it is being redirected to? Examplify please.

Is the bot getting a URI with an ID appended to it? I don't believe it is going to follow that. The bot knows that once it hits a Session ID that it could get caught in an endless loop. I've not had to deal with this personally and my experience comes from following the topics over the years. Someone please correct me if I'm wrong on the Session ID.

ogletree

6:48 pm on Aug 9, 2007 (gmt 0)

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



It is very strange. You type:

www.domain.com/subdir/

in a browser and that is what stays there. You type the same thing in a header checker and you get

HTTP/1.1 302 Found =>
Connection => close
Date => Thu, 09 Aug 2007 18:46:19 GMT
Server => Microsoft-IIS/6.0
X-Powered-By => ASP.NET
X-AspNet-Version => 2.0.50727
Location => /subdir/Default.aspx?AspxAutoDetectCookieSupport=1
Set-Cookie => AspxAutoDetectCookieSupport=1; path=/
Cache-Control => private
Content-Type => text/html; charset=utf-8
Content-Length => 168

carguy84

4:04 am on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you sure you're not typing in:

www.domain.com/subdir

to the header checker?

www.domain.com/subdir will 302 redirect to www.domain.com/subdir/ in IIS.

ogletree

12:12 pm on Aug 17, 2007 (gmt 0)

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



lol when I tried with out the trailing / I got

HTTP/1.1 301 Moved Permanently =>
Content-Length => 160
Content-Type => text/html
Location => http://www.example.com/subdir
Server => Microsoft-IIS/6.0
X-Powered-By => ASP.NET
Date => Fri, 17 Aug 2007 12:11:08 GMT
Connection => close

Even better.

[edited by: engine at 1:11 pm (utc) on Aug. 17, 2007]
[edit reason] examplified [/edit]