Category: Developer

Increase the Visibility of a Website with Search Engine Optimization

Search engine optimization, or SEO, began in the 1990s as a way for webmasters to catalog the first websites for early search engines. At first, all a webmaster had to do was to turn in an address for each corresponding website to search engines, which would then “crawl” the site and return important information to be indexed. Search engines do this by sending a “spider” – a program that scours the Internet for information – to download the page the words it contains, links, and so on into a scheduler for retrieval later.

The owners of these sites soon began to see an advantage in having their sites and content SEO optimized, which caused them to be ranked higher in Internet searches. This opened up the field for people who began offering their services to site owners. By 1997, the term “search engine optimization” had been coined, and a new aspect of Internet marketing was born.

The Beginnings of SEO

The earliest search engines relied on information supplied by webmasters like meta tags and index files to guide searches to a page’s content. However, meta tags were soon deemed to be unreliable, as they depended upon a webmaster’s choice of keywords, which may not necessarily be indicative of a website’s actual content. Using this data which might not have been accurate caused many searches to be filled with irrelevant results, while content providers were manipulating the HTML attributes in order to skew search engine results.

Search engines were soon suffering, due to being at the mercy of webmasters and their manipulation of SEO factors, like keyword density. Search engines then adapted and took steps to ensure relevant results came back instead of pages filled with webmaster’s manipulated content. This was very important, as a search engine is often judged on the ability to return relevant searches. By not eliminating these types of webmaster influenced searches, users could become frustrated and seek their information in other places. Many search engines began to utilize search methods that were much more difficult for webmasters to manipulate and control. Some of these search engines began using complex mathematical algorithms to rate the popularity of websites. The page ranking for websites became based on the quality and quantity of inbound links. These algorithms make estimations on the likelihood of the average person surfing onto the site, and then follow each link on the page. This means more accurate rankings, as the algorithm decides the likelihood of someone visiting a site purely by surfing. This means some rankings are stronger than others.

By 1997, search engines began to recognize when webmasters were loading down pages with irrelevant terms and words in order to get their sites a much higher page ranking than they would have ordinarily gotten. Many search engines responded by adjusting the algorithms they were using in order to prevent unscrupulous webmasters from being able to manipulate the resulting page ranks.

By the mid-2000′s, an annual conference had been organized to bring together people interested in the benefits of SEO, VPN service , and other technical advances in searching, and their implementation. By the late 2000′s, page ranking was regarded as dead, while personalized searches had begun to be the norm.

What does SEO Mean for Websites?

Even though SEO is widely regarded as the norm these days, being overly aggressive with its implementation on a site can cause the website to be barred for showing up in search results. Companies who utilized these techniques ended up causing many of their clients to be banned, which was widely reported on blogs. Some of these companies tried to sue bloggers in an attempt to keep their names from being connected to the bans, but that was of little use to them, and a lot of websites began to turn elsewhere for their optimizations. Most of these companies were banned from the larger search engines, and so were their clients, marking a real turning point away from the old technique of stuffing words to skew search results.

Today, many companies take advantage of SEO to help their sites reach the maximum amount of potential customers, by taking care to carefully select and place the important words to their company and not filling their sites with random words. This allows searches to return much better results for any particular search term. Companies have also seen an increase in traffic as a direct result of people being better able to find the relevant information they are searching for without having to weed through and endless amount of irrelevant sites.

Using SEO is something any company or business can do, bringing them greater visibility among their competitors, while better serving the public at large, who looks to the web to provide them the solutions they need with a minimum amount of useless clicking.

 

Create a simple PageTab app

First thing first go to https://developers.facebook.com and create a new app. Copy the AppID and Secret to web.config:

<configuration> <configSections> <section name=”FacebookAppConfig” type=”ComputerBeacon.Facebook.Server.AppConfig”/> </configSections> <system.web> <compilation debug=”true” targetFramework=”4.0″ /> </system.web> <FacebookAppConfig AppID=”xxxxxxxx” AppSecret=”xxxxxxx” /> </configuration>

Next, go to the app settings page on Facebook, and check the Page Tab function. Give your app a fancy name. Point the Page Tab URL and Secure Page Tab URL to an address that contains the aspx page you’ll be creating. Localhost is also acceptable. Now here’s the problem: Facebook requires apps to accept https connection. Normally enabling sandbox mode will temporarily allow normal http connection, but this doesn’t work for Page Tabs (most probably Facebook bug). This blog post explains how to create local SSL certificates for development purpose. When you deploy the application of course, you will need to purchase one for your server.

Here I’m going to create a very simple app called “Sum your name” – it basically just sums the ASCII (or unicode) values of the characters in your name and displays it. This is the same sample that is used for the Canvas and Page Tab demo at https://apps.facebook.com/aspdotnetsample/ .

To access the user’s name we need the user to authorize our app. So let’s put the below html into our .aspx page:

<div id=”div_Authorized” runat=”server”> <p>Your name is: <asp:Label ID=”Label_name” runat=”server” /></p> <p>The sum of the ASCII values of your name is: <asp:Label ID=”Label_Sum” runat=”server” /></p> </div> <div id=”div_NotAuthorized” runat=”server”> <p>You have not authorized the app.</p> <asp:Button runat=”server” Text=”Authorize” OnClick=”AuthClick” /> </div>

People often have questions about how to display different content for users who have and have not authorized the app. The simplest solution is render everything in a single .aspx page. After all, it’s a server-side script, so all it matters is delivering the right html to the user. Do not use IframeRedirect, Response.Redirect or <a> links, because the information that is POSTed by Facebook will get lost in this process.

The C# code behind this page is quite straight forward:

public partial class PageTab : System.Web.UI.Page { PageTabContext context; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //the Page Tab does not require authorization context = PageTabContext.FromConfig(this.Context); context.Login(); ViewState[“PageTabContext”] = context.ToSerializedString(); } else { context = PageTabContext.FromSerializedString(this.Context, ViewState[“PageTabContext”] as string); } //to display different message to users who have and have not authorized the app, simply hide(or show) the html content dynamically if (context.Session == null) div_Authorized.Visible = false; else { div_NotAuthorized.Visible = false; ComputerBeacon.Facebook.Models.User u = new ComputerBeacon.Facebook.Models.User(“me”, context.Session.AccessToken); string name = u.Name; UInt64 sum = 0; foreach (char c in name) sum += c; Label_Sum.Text = sum.ToString(); Label_name.Text = name; } } protected void AuthClick(object sender, EventArgs e) { context.RedirectToFacebookAuthorization(); } }

(context.Session == null) tells whether the user has not authorized the app.

Call the RedirectToFacebookAuthorization() method as necessary. After authorization, the user will be redirected to this page again by Facebook.

Final thing, we need a mechanism that would allow Page administrators to add our app to their pages. This is achieved by redirecting the administrator to an address obtained by calling Dialog.GetAddPageTabUrl() method. You can do this at anywhere you like, it can be a website, it can be Canvas app, or a link in an email. Below is an example of how to achieve this in a canvas app:

AppConfig config = AppConfig.FromConfigFile; string url = Dialog.GetAddPageTabUrl(config.AppID, “https://apps.facebook.com/” + config.CanvasNamespace + “/PageTabDialog.aspx”, DialogDisplayType.FullPage);

If it is just a normal ASP.NET webpage, you can put the link in an <a> tag or use Response.Redirect. If you get an error from Facebook saying that the url address must be owned by the app, simply go to the app settings and add your domain name there.

Finally, publish your app. And that’s it!