IIS8 – SEARCH ENGINE OPTIMIZATION(SEO)

In this post we are going to optimize website that hosted in IIS8 implementing basic SEO rule to help improve better user experience at the same time increase SEO ranking.

According to Google’s Search Engine Optimization Starter Guide we will optimize our IIS application.

Let’s get stepped into it. First of all we will get basic overview on IIS8 and SEO.

IIS8: Microsoft’s Internet Information Server (IIS) is an extensible web Server that host multiple web application/site.

IIS supports HTTP, HTTPS, FTP, FTPS, SMTP and NNTP.

Other’s web servers include

  1. Apache,
  2. NGNIX (pronounced engine X) from NGNIX.
  3. Novell’s NetWare server,
  4. Google Web Server (GWS) and
  5. IBM’s family of Domino servers.

SEO: SEO is a process to improve the visibility of a website in search engine results. Learn more from GOOGLE

Table of Content:

  1. Improving Site Structure
    • Sitemap
  2. Dealing with Crawlers
    • robot.txt
    • BOT accessibility(Libwww-perl Access)
  3. Server Security
    • Server Signature (Server: Microsoft-IIS/8.0)
  4. Canonicalization
    • URL Canonicalization
    • IP Canonicalization
  5. Optimizing Content
    • Page Cache (Server Side Caching)
    • Expires Tag
    • HTML Compression/GZIP

Let’s get details about those topics with an basic sample application hosted in IIS. First of all we need to configure IIS to host our website. We will change windows host file to set hostname with local ip and port.

Modification of Host file, browse file : c:\Windows\System32\Drivers\etc\hosts

seo1

hit enter and then open with notepad, copy content to another opened note(open with Run as administrator) paste content > make changes > Save with replace host file.

seo2

now open browser in url bar write localseo.com and hit enter, our local site will load.

1) Improving Site Structure

1.1) Sitemap

Applications need to be well structured based on root/home page, better to using breadcrumbs that help user to navigate root/home page. Sitemap improve crawling of site by crawlers, we can also use a sitemap Xml file to help web crawlers (Google or Other search engine) listing the pages content of the site.

Below is a sample sitemap Xml format, upload the XML file (sitemap.xml) to root folder.




  
    http://localseo.com
  
  
    http://localseo.com/Home
  
  
    http://localseo.com/About
  
  
    http://localseo.com/Contact
  

in iis i have place the sitemap.xml file in root folder.

seo3

2) Dealing with Crawlers

2.1) Web Robots

Web robots are known as spider/crawler are programmed to visit/index the site content automatically. Robots.txt file to give instructions site to web robots.

User-agent: *
Disallow: /

The “User-agent: *” means this section applies to all robots. The “Disallow: /” tells the robot that it should not visit any pages on the site. Learn more about robot.

2.2) Libwww-perl Access BOT

We can restrict BOT access using webconfig by URL rewwrite rules. We need to enable IIS URL Rewrite 2.0. Click Web Platform Installer in IIS Management section.

seo4

a list of component will appear, search with writing “Rewrite” hit enter.

seo6

search result will show  URL Rewrite 2.0, Install it now.

seo5

after installation URL Rewrite icon will appear, double click on it.

seo7

let’s create a new rule for Libwww-perl BOT to restrict access website.

seo8

then configure for BOT rule to restrict.

seo9

or Simply copy paste below code in webconfig then replace ur pattern.


  
    
      
        
        
          
        
        
      
    
  

 

3) Server Security

3.1) Server Signature

From security aspects it is important to turn it off, by default it is set on. Here we will rewrite server signature with outbound rule in IIS.

seo10

again double click on URL Rewrite icon and add Server variable like below image.

seo11

seo12

seo13

or Simply copy paste below code in webconfig then replace ur Changed value


  
    
      
        
        
      
    
  

seo14

  4) Canonicalization

4.1) URL Canonicalization

seo16

make sure the bindings are proper with the host name in IIS. Now create a new inbound rule for Canonicalization both IP and URL with www.

seo15

or Simply copy paste below code in webconfig then replace ur pattern and redirect.


  
    
      
        
        
          
        
        
      
    
  

 

5) Optimizing Content

For better performance it is good to cache the static content. There are three different . The default is NoControl.

  1. NoControl Does not add a Cache-Control or Expires header to the response.
  2. DisableCache Adds a Cache-Control: no-cache header to the response.
  3. UseMaxAge Adds a Cache-Control: max-age= header to the response based on the value specified in the CacheControlMaxAge attribute..
  4. UseExpires Adds an Expires: header to the response based on the date specified in the httpExpires attribute.

 

5.1) Page Cache (Server Side Caching)

seo19

seo20


      

seo21

5.2) Expires Tag


    

seo22

5.3) HTML Compression/GZIP

seo17

seo18

Finally the webconfig file




  
    
    
    
    
  
  
    
    
  
  
    
      
    
    
      
        
          
          
            
          
          
        
        
          
          
            
          
          
        
      
      
        
          
          
        
      
    
  
  
    
      
        
        
      
      
        
        
      
      
        
        
      
    
  
  
    
      
      
    
  

Hope this will help 🙂

Author:

Since March 2011, have 8+ years of professional experience on software development, currently working as Senior Software Engineer at s3 Innovate Pte Ltd.

2 thoughts on “IIS8 – SEARCH ENGINE OPTIMIZATION(SEO)”

Leave a Reply