Forum Discussion

asd3r's avatar
asd3r
Copper Contributor
Jul 02, 2022

How to display the favicon of my site in bing search result?

The favicon is shown on my browser when I open my site,

but is not shown in the bing search result.

 

What is the required format of html code?

1 Reply

  • EhudZ's avatar
    EhudZ
    Copper Contributor

    Hi asd3r 

     

    This could possibly happen due to Your .htaccess blocking of hotlinking done by bing.

    To exclude bing, possibly add both IP ranges used by bing, and also the bing URL.

    A revised .htaccess may look like this:

     

     

    <IfModule mod_rewrite.c>
    # enable the rewrite engine
    RewriteEngine on
    # Example
    RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
    RewriteCond %{REMOTE_ADDR} !^<Server public IP>$
    RewriteCond %{REMOTE_ADDR} !^<Server Private IP>$
    RewriteCond %{REMOTE_ADDR} !^<Your Private IP 1>$
    RewriteCond %{REMOTE_ADDR} !^<Your Private IP 2>$
    RewriteCond %{REMOTE_ADDR} !^<AWS SSH IP>(.*)$
    # Apple IPs
    RewriteCond %{REMOTE_ADDR} !^17\.58(.*)$ 
    RewriteCond %{REMOTE_ADDR} !^17\.121(.*)$ 	
    # Facebook IPs
    RewriteCond %{REMOTE_ADDR} !^173\.252(.*)$ 	
    RewriteCond %{REMOTE_ADDR} !^69\.171(.*)$ 		
    # Twitter IPs
    RewriteCond %{REMOTE_ADDR} !^103\.252\.112\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^103\.252\.113\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^103\.252\.114\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^103\.252\.115\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^104\.244\.40\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^185\.45\.5\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^185\.45\.6\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^185\.45\.7\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^188\.64\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^192\.133\.76\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^192\.133\.77\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^192\.133\.78\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^192\.133\.79\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^192\.44\.69\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^199\.16\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^199\.59\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^199\.96\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^199\.96\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^202\.160\.128\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^202\.160\.129\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^202\.160\.130\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^202\.160\.131\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^209\.237\.192\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^64\.63\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^69\.195\.(.*)$
    # LinedIn IP
    RewriteCond %{REMOTE_ADDR} !^108\.174\.2\.(.*)$
    
    # Google IPs
    RewriteCond %{REMOTE_ADDR} !^66\.249(.*)$
    # Allow bing
    RewriteCond %{REMOTE_ADDR} !^40\.77\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^157\.55\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^157\.56\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^13\.66(.*)$
    RewriteCond %{REMOTE_ADDR} !^13\.67\.10\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^13\.69\.66\.24(.*)$
    RewriteCond %{REMOTE_ADDR} !^13\.71\.172\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^139\.217\.52\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^191\.233\.204\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^20\.36\.108\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^20\.43\.120\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^207\.46\.13\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.167\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^52\.167\.144\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^157\.55\.39\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^199\.30\.24\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^199\.30\.25\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^20\.125\.163\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^20\.74\.197\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^20\.79\.107\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.139\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.188\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.189\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.190\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.191\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.77\.202\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.79\.131\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^40\.79\.186\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^51\.105\.67\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^52\.231\.148\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^65\.55\.210\.(.*)$
    RewriteCond %{REMOTE_ADDR} !^72\.14\.(.*)$
    # check that file exists
    RewriteCond %{REQUEST_FILENAME} -f
    # check for requested file types
    # include additional file types here
    RewriteCond %{REQUEST_FILENAME} \.(jpeg|JPEG|jpe|JPE|jpg|JPG|gif|GIF|png|PNG|mng|MNG|svg|SVG|IMG|img|webp|WEBP)$                [NC]
    # allow blank referrer requests
    RewriteCond %{HTTP_REFERER}     !^$
    # allow all requests from your domain
    # edit the domain to match your own
    RewriteCond %{HTTP_REFERER}     !^https?://([^.]+\.)?example\.      [NC]
    # allow all requests from your ip address
    # edit the ip address to match your own
    
    # additional site access
    # include additional sites here replace domain names and or 
    # remove unnecessary lines or add new lines for more sites
    # RewriteCond %{HTTP_REFERER}     !^https?://([^.]+\.)?domain_01\.   [NC]
    
    # search engine access
    # include or remove search engines feed readers and other sites
    RewriteCond %{HTTP_REFERER}     !<your site>\.                     [NC]
    RewriteCond %{HTTP_REFERER}     !google\.                          [NC]
    RewriteCond %{HTTP_REFERER}     !yahoo\.                           [NC]
    RewriteCond %{HTTP_REFERER}     !twitter\.                         [NC]
    RewriteCond %{HTTP_REFERER}     !whatsapp\.                        [NC]
    RewriteCond %{HTTP_REFERER}     !facebook\.                        [NC]
    RewriteCond %{HTTP_REFERER}     !msn\.                             [NC]
    RewriteCond %{HTTP_REFERER}     !linkedin\.                        [NC]
    RewriteCond %{HTTP_REFERER}     !bing\.                            [NC]
    RewriteCond %{HTTP_REFERER}     !duckduckgo\.                      [NC]
    # allow access to all requests for your anti hotlink image
    # to serve an image instead of delivering a 403 error
    # uncomment the next line and edit the path and file name
    RewriteCond %{REQUEST_URI}    !^/wpt-hotlinked-image-stub\.png$                   [NC]
    
    # deliver the hotlink image for all requests for the listed files
    # protect additional file types by editing the list below
    # if you are serving a file instead of a 403 
    # uncomment the next line and edit the path and file name
    RewriteRule \.(jpeg|JPEG|jpe|JPE|jpg|JPG|gif|GIF|png|PNG|mng|MNG|svg|SVG|IMG|img)$ https://example.com/error-page/    [R,NC,L]
    
    # return a 403 error when any of the following file types is requested
    # you can protect additional file types by editing the list below
    # RewriteRule \.(gif|jpe?g?|png)$                                  - [F,NC,L]
    
    # close the module container
    </ifModule>

     

Resources