{"id":7417,"date":"2017-06-21T06:00:21","date_gmt":"2017-06-21T10:00:21","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=7417"},"modified":"2017-06-21T06:00:21","modified_gmt":"2017-06-21T10:00:21","slug":"wpw-more-about-crawling","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2017\/06\/21\/wpw-more-about-crawling\/","title":{"rendered":"WpW: More About Crawling"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-7561\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/06\/wpw06.jpg\" alt=\"\" width=\"640\" height=\"320\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/06\/wpw06.jpg 640w, https:\/\/lswp.store\/wp-content\/uploads\/2017\/06\/wpw06-300x150.jpg 300w, https:\/\/lswp.store\/wp-content\/uploads\/2017\/06\/wpw06-600x300.jpg 600w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Welcome to another installment of <a href=\"http:\/\/blog.litespeedtech.com\/tag\/wordpress-wednesday\">WordPress Wednesday<\/a>!<\/p>\n<p><a href=\"https:\/\/lswp.store\/2017\/06\/14\/wpw-crawl-your-site-make-it-fly\/\">Last week<\/a> we talked about the new crawler functionality in our <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">LiteSpeed Cache for WordPress plugin<\/a>, and since then there have been<b> some questions about enabling the crawler, and a couple of new fields added to the Settings page<\/b>. Today, we thought it would be a good idea to talk about these things and get everyone up to speed and on the same page.<\/p>\n<h2>Enabling the Crawler<\/h2>\n<p>This has been the area where we\u2019ve had the most requests for help, so let\u2019s see if we can clear up some of the confusion.<\/p>\n<p>The first thing to know is that <b>the crawler must be enabled at the server or virtual host level<\/b>. If you don\u2019t have access to these areas, you will need to ask your web host to do it for you.<\/p>\n<p>Additionally, this functionality <b>requires the latest build<\/b> of our server software, so if you\u2019re running 5.1.16 and you are still having difficulty getting the crawler enabled, chances are you are not running the latest build (as of this writing, that is LSWS version 5.1.16 build 3). Force a reinstall, and it should work.<\/p>\n<p>Enabling the crawler requires you to add a few lines to a server config file or a virtual host include file. These are those lines:<\/p>\n<pre>&lt;IfModule Litespeed&gt;\n CacheEngine on crawler\n&lt;\/IfModule&gt;\n<\/pre>\n<p>Due to the fact that every control panel stores its config files in its own directory structure, we can\u2019t just say, \u201cupdate <code>filexyz<\/code>.\u201d We have, however, written up <a href=\"https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:lscwp:configuration:enabling_the_crawler\">a detailed wiki article<\/a> that explains where you need to look for your particular control panel (or for no control panel at all). We recommend that you <b>refer to <a href=\"https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:lscwp:configuration:enabling_the_crawler\">the wiki<\/a><\/b> to be sure you\u2019re putting the code in the proper location.<\/p>\n<h2>New Fields<\/h2>\n<p>There are two new fields on the <b>WP-Admin &gt; LiteSpeed Cache &gt; Settings &gt; Crawler<\/b> tab. <b>Site IP<\/b> allows the crawler to go directly to your server to retrieve content, without having to get the DNS involved. <b>Custom Sitemap<\/b> allows the crawler to use a sitemap you already have, rather than building its own.<\/p>\n<h3>Site IP<\/h3>\n<p>As of the plugin\u2019s version 1.1.1, you can enter your Site\u2019s IP address to simplify the crawling process and eliminate the overhead involved in Domain Name Server (DNS) and Content Delivery Network (CDN) lookups.<\/p>\n<p><i>Note: a server may have multiple IPs. Use the IP address that was set for your domain in the server\u2019s configuration.<\/i><\/p>\n<p>Conventionally, the crawler retrieves a URL to crawl from the sitemap, and looks to the DNS to get the URL\u2019s IP address. If you\u2019re using a CDN, the IP that the DNS returns is <i>actually that of the CDN<\/i>. The CDN only caches static content, so when the crawler asks the CDN for the dynamically-generated content it needs, the CDN must go back to your server to retrieve it and <i>then<\/i> return it to the crawler. This is so inefficient! The crawler, which lives on the same server as your content, needs to travel all over the internet before it can get that content!<\/p>\n<p>On the other hand, if you tell LiteSpeed\u2019s crawler ahead of time what your domain\u2019s IP address is, it doesn\u2019t need to involve the DNS or CDN at all. The content can be retrieved directly from the server. Nice!<\/p>\n<p>To understand this better, let\u2019s look at this diagram:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" title=\"\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/06\/null-1.png\" alt=\"\" width=\"588\" height=\"445\" \/><\/p>\n<p>In other words&#8230;<\/p>\n<h4>If you are using a CDN<\/h4>\n<ul>\n<li>The crawler retrieves <code>http:\/\/yourserver.com\/path<\/code> from the sitemap<\/li>\n<li>The crawler requests <code>yourserver.com<\/code>&#8216;s IP address from the DNS<\/li>\n<li>The DNS returns the CDN\u2019s IP address to the crawler<\/li>\n<li>The crawler requests dynamic content from the CDN<\/li>\n<li>The CDN must retrieve the page from <code>yourserver.com<\/code><\/li>\n<li>The CDN returns the page to the crawler<\/li>\n<\/ul>\n<h4>If you are not using a CDN<\/h4>\n<ul>\n<li>The crawler retrieves <code>http:\/\/yourserver.com\/path<\/code> from the sitemap<\/li>\n<li>The crawler requests <code>yourserver.com<\/code>\u2019s IP address from the DNS<\/li>\n<li>The DNS returns your server\u2019s IP address to the crawler<\/li>\n<li>The crawler retrieves the page from <code>yourserver.com<\/code><\/li>\n<\/ul>\n<p>In both scenarios, there are lookups that occur, expending time and resources. These lookups can be eliminated by entering your domain\u2019s IP in this field.<\/p>\n<h4>If Site IP has been specified<\/h4>\n<ul>\n<li>The crawler retrieves <code>http:\/\/yourserver.com\/path<\/code> from the sitemap<\/li>\n<li>The crawler retrieves the page directly from <code>yourserver.com<\/code> because it already knows the IP address<\/li>\n<\/ul>\n<p>So, you can see that by entering your site\u2019s IP address, <b>the middlemen are eliminated, along with all of their overhead<\/b>. That\u2019s pretty useful. Honestly, is there any reason why you would <i>not<\/i> want to use this option?<\/p>\n<h3>Custom Sitemap<\/h3>\n<p>A sitemap tells the crawler which pages on your site should be crawled. By default, LSCache for WordPress generates its own sitemap. If, however, you already have a sitemap in <a href=\"https:\/\/www.sitemaps.org\/index.html\">standard XML Sitemap format<\/a>, and you\u2019d like to use that, it\u2019s an option as of v1.1.1.<\/p>\n<p>Be sure to enter the full URL to the sitemap.<\/p>\n<h2>Any questions?<\/h2>\n<p>This covers the bulk of the issues we\u2019ve been addressing over the last week, but if there\u2019s something else you want to know, please do reach out to us! You are welcome to post a comment here, leave a question <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">on the plugin forum<\/a>, or <a href=\"https:\/\/store.litespeedtech.com\/store\/clientarea.php\">open a ticket<\/a>. How can we help?<\/p>\n<p>&#8212;<\/p>\n<p>Have some of your own ideas for future <a href=\"http:\/\/blog.litespeedtech.com\/tag\/wordpress-wednesday\">WordPress Wednesday<\/a> topics? Leave us a comment!<\/p>\n<p>Don\u2019t forget to meet us back here next week for the next installment. In the meantime, here are a few other things you can do:<\/p>\n<ul>\n<li>Subscribe to the <a href=\"http:\/\/blog.litespeedtech.com\/tag\/wordpress-wednesday\/feed\/\">WordPress Wednesday RSS feed<\/a><\/li>\n<li>Download <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">LiteSpeed Cache for WordPress plugin<\/a><\/li>\n<li>Learn more about the plugin <a href=\"https:\/\/www.litespeedtech.com\/products\/cache-plugins\/wordpress-acceleration\">on our website<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You have questions? We&#8217;ve got answers. This week we&#8217;re talking some more about our crawler functionality.<\/p>\n","protected":false},"author":1,"featured_media":8152,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28],"tags":[81,316,317],"class_list":["post-7417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cache","tag-crawler","tag-wordpress","tag-wordpress-wednesday"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2017\/07\/wpw07.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/7417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=7417"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/7417\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/8152"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=7417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=7417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=7417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}