I found that there is not much information available on the Net about how to optimize
your ASP.NET pages so that they may be found on Google.
Here are a few tips:
- Use the System.Web.UI.HtmlControls.HtmlMeta
class for meta headers. Initialize, set the
value and add to page.header.controls.
- Use this.Title
= “Title here”;
- For Anchor tags, use this format <a runat=”server”
href = “~/Folder/FileName.aspx”>link text </a> . The runat=”server” part
is most important or else, maintaining your link integrity is a headache.
- If you use SessionIds, try not to do that via the
querystring. If on separate tries, the spider sees different URLs, it may take them
as different pages. Of course, later on it may flag all those other pages
as duplicate, but your bandwidth is wasted unnecessarily.
- Put your links on the Master page so that the same
links are available from every page. Add additional links to your important
pages from the body copy.
- Postbacks are not very good for SEO. If you
are displaying content only on the click of a button or some other user action,
the content may not be available to the spider.
- Avoid the use of hyperlinkbuttons. They include
javascript code instead of actual links that may or may not be read by the spider.
Use regular anchor tags as in point 3 above.
- Do not put the link to the copyright notice(or
web-designer email) on the Master Page. It gets copied on every content page and
takes away from the ranking of other links. If you must, make sure the spider does
not follow it by using rel=”nofollow”.
- Viewstate. This is a problem if you are trying
to optimize pages with a lot of dataentry objects like text boxes and dropdowns.
ASP.NET creates a hidden variable and posts it back to the page with a lot of encrypted
data that stores the state of the controls on the page. Spiders may find the
keywords way down on the page, and your keyword density may also suffer because
of the added viewstate data. This is not often an issue with regular text
only pages.