diff --git a/tools/ndn-autoconfig/base.cpp b/tools/ndn-autoconfig/base.cpp
index c95eb21..35c6f56 100644
--- a/tools/ndn-autoconfig/base.cpp
+++ b/tools/ndn-autoconfig/base.cpp
@@ -41,6 +41,7 @@
 Base::connectToHub(const std::string& uri)
 {
   FaceUri faceUri(uri);
+  std::cerr << "About to connect to: " << uri << std::endl;
 
   faceUri.canonize(bind(&Base::onCanonizeSuccess, this, _1),
                    bind(&Base::onCanonizeFailure, this, _1),
@@ -52,8 +53,6 @@
 void
 Base::onCanonizeSuccess(const FaceUri& canonicalUri)
 {
-  std::cerr << "About to connect to: " << canonicalUri.toString() << std::endl;
-
   m_controller.start<ndn::nfd::FaceCreateCommand>(
     ControlParameters().setUri(canonicalUri.toString()),
     bind(&Base::onHubConnectSuccess, this, _1),
diff --git a/tools/ndn-autoconfig/main.cpp b/tools/ndn-autoconfig/main.cpp
index 61ae22a..fc3a6fc 100644
--- a/tools/ndn-autoconfig/main.cpp
+++ b/tools/ndn-autoconfig/main.cpp
@@ -27,6 +27,7 @@
 
 #include "multicast-discovery.hpp"
 #include "guess-from-search-domains.hpp"
+#include "ndn-fch-discovery.hpp"
 #include "guess-from-identity-name.hpp"
 
 #include <ndn-cxx/util/network-monitor.hpp>
@@ -60,7 +61,7 @@
   };
 
   explicit
-  NdnAutoconfig(bool isDaemonMode)
+  NdnAutoconfig(const std::string& ndnFchUrl, bool isDaemonMode)
     : m_face(m_io)
     , m_scheduler(m_io)
     , m_startStagesEvent(m_scheduler)
@@ -77,8 +78,14 @@
                  m_stage3.start();
                })
     , m_stage3(m_face, m_keyChain,
+               ndnFchUrl,
                [&] (const std::string& errorMessage) {
                  std::cerr << "Stage 3 failed: " << errorMessage << std::endl;
+                 m_stage4.start();
+               })
+    , m_stage4(m_face, m_keyChain,
+               [&] (const std::string& errorMessage) {
+                 std::cerr << "Stage 4 failed: " << errorMessage << std::endl;
                  if (!m_isDaemonMode)
                    BOOST_THROW_EXCEPTION(Error("No more stages, automatic discovery failed"));
                  else
@@ -155,7 +162,8 @@
 
   MulticastDiscovery m_stage1;
   GuessFromSearchDomains m_stage2;
-  GuessFromIdentityName m_stage3;
+  NdnFchDiscovery m_stage3;
+  GuessFromIdentityName m_stage4;
 };
 
 static int
@@ -163,6 +171,7 @@
 {
   bool isDaemonMode = false;
   std::string configFile;
+  std::string ndnFchUrl;
 
   po::options_description optionDescription("Options");
   optionDescription.add_options()
@@ -172,6 +181,8 @@
      "auto-discovery procedure.  In addition, the auto-discovery procedure "
      "is unconditionally re-run every hour.\n"
      "NOTE: if connection to NFD fails, the daemon will be terminated.")
+    ("ndn-fch-url", po::value<std::string>(&ndnFchUrl)->default_value("http://ndn-fch.named-data.net"),
+     "URL for NDN-FCH (Find Closest Hub) service")
     ("config,c", po::value<std::string>(&configFile), "configuration file. If `enabled = true` "
      "is not specified, no actions will be performed.")
     ("version,V", "show version and exit")
@@ -223,7 +234,7 @@
   }
 
   try {
-    NdnAutoconfig autoConfigInstance(isDaemonMode);
+    NdnAutoconfig autoConfigInstance(ndnFchUrl, isDaemonMode);
     autoConfigInstance.run();
   }
   catch (const std::exception& error) {
diff --git a/tools/ndn-autoconfig/ndn-fch-discovery.cpp b/tools/ndn-autoconfig/ndn-fch-discovery.cpp
new file mode 100644
index 0000000..56b7fd1
--- /dev/null
+++ b/tools/ndn-autoconfig/ndn-fch-discovery.cpp
@@ -0,0 +1,216 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ndn-fch-discovery.hpp"
+#include <boost/regex.hpp>
+#include <boost/algorithm/string.hpp>
+
+namespace ndn {
+namespace tools {
+namespace autoconfig {
+
+/**
+ * A partial and specialized copy of ndn::FaceUri implementation
+ *
+ * Consider removing in favor of a library-provided URL parsing, if project
+ * includes such a library.
+ */
+class Url
+{
+public:
+  Url(const std::string& url)
+    : m_isValid(false)
+  {
+    static const boost::regex protocolExp("(\\w+\\d?(\\+\\w+)?)://([^/]*)(\\/[^?]*)?");
+    boost::smatch protocolMatch;
+    if (!boost::regex_match(url, protocolMatch, protocolExp)) {
+      return;
+    }
+    m_scheme = protocolMatch[1];
+    const std::string& authority = protocolMatch[3];
+    m_path = protocolMatch[4];
+
+    // pattern for IPv6 address enclosed in [ ], with optional port number
+    static const boost::regex v6Exp("^\\[([a-fA-F0-9:]+)\\](?:\\:(\\d+))?$");
+    // pattern for IPv4-mapped IPv6 address, with optional port number
+    static const boost::regex v4MappedV6Exp("^\\[::ffff:(\\d+(?:\\.\\d+){3})\\](?:\\:(\\d+))?$");
+    // pattern for IPv4/hostname/fd/ifname, with optional port number
+    static const boost::regex v4HostExp("^([^:]+)(?:\\:(\\d+))?$");
+
+    if (authority.empty()) {
+      // UNIX, internal
+    }
+    else {
+      boost::smatch match;
+      bool isV6 = boost::regex_match(authority, match, v6Exp);
+      if (isV6 ||
+          boost::regex_match(authority, match, v4MappedV6Exp) ||
+          boost::regex_match(authority, match, v4HostExp)) {
+        m_host = match[1];
+        m_port = match[2];
+      }
+      else {
+        return;
+      }
+    }
+    if (m_port.empty()) {
+      m_port = "80";
+    }
+    if (m_path.empty()) {
+      m_path = "/";
+    }
+    m_isValid = true;
+  }
+
+  bool
+  isValid() const
+  {
+    return m_isValid;
+  }
+
+  const std::string&
+  getScheme() const
+  {
+    return m_scheme;
+  }
+
+  const std::string&
+  getHost() const
+  {
+    return m_host;
+  }
+
+  const std::string&
+  getPort() const
+  {
+    return m_port;
+  }
+
+  const std::string&
+  getPath() const
+  {
+    return m_path;
+  }
+
+private:
+  bool m_isValid;
+  std::string m_scheme;
+  std::string m_host;
+  std::string m_port;
+  std::string m_path;
+};
+
+class HttpException : public std::runtime_error
+{
+public:
+  explicit
+  HttpException(const std::string& what)
+    : std::runtime_error(what)
+  {
+  }
+};
+
+NdnFchDiscovery::NdnFchDiscovery(Face& face, KeyChain& keyChain,
+                                 const std::string& url,
+                                 const NextStageCallback& nextStageOnFailure)
+  : Base(face, keyChain, nextStageOnFailure)
+  , m_url(url)
+{
+}
+
+void
+NdnFchDiscovery::start()
+{
+  try {
+    using namespace boost::asio::ip;
+    tcp::iostream requestStream;
+
+    requestStream.expires_from_now(boost::posix_time::milliseconds(3000));
+
+    Url url(m_url);
+    if (!url.isValid()) {
+      BOOST_THROW_EXCEPTION(HttpException("Invalid NDN-FCH URL: " + m_url));
+    }
+
+    if (!boost::iequals(url.getScheme(), "http")) {
+      BOOST_THROW_EXCEPTION(HttpException("Only http:// NDN-FCH URLs are supported"));
+    }
+
+    requestStream.connect(url.getHost(), url.getPort());
+
+    if (!requestStream) {
+      BOOST_THROW_EXCEPTION(HttpException("HTTP connection error to " + m_url));
+    }
+
+    requestStream << "GET " << url.getPath() << " HTTP/1.0\r\n";
+    requestStream << "Host: " << url.getHost() << ":" << url.getPort() << "\r\n";
+    requestStream << "Accept: */*\r\n";
+    requestStream << "Cache-Control: no-cache\r\n";
+    requestStream << "Connection: close\r\n\r\n";
+    requestStream.flush();
+
+    std::string statusLine;
+    std::getline(requestStream, statusLine);
+    if (!requestStream) {
+      BOOST_THROW_EXCEPTION(HttpException("HTTP communication error"));
+    }
+
+    std::stringstream responseStream(statusLine);
+    std::string httpVersion;
+    responseStream >> httpVersion;
+    unsigned int statusCode;
+    responseStream >> statusCode;
+    std::string statusMessage;
+
+    std::getline(responseStream, statusMessage);
+    if (!static_cast<bool>(requestStream) || httpVersion.substr(0, 5) != "HTTP/") {
+      throw HttpException("HTTP communication error");
+    }
+    if (statusCode != 200) {
+      boost::trim(statusMessage);
+      throw HttpException("HTTP request failed: " +
+                          std::to_string(statusCode) + " " + statusMessage);
+    }
+    std::string header;
+    while (std::getline(requestStream, header) && header != "\r")
+      ;
+
+    std::string hubHost;
+    requestStream >> hubHost;
+
+    if (hubHost.empty()) {
+      throw HttpException("NDN-FCH did not return hub host");
+    }
+
+    this->connectToHub("udp://" + hubHost);
+  }
+  catch (const std::runtime_error& e) {
+    m_nextStageOnFailure(std::string("Failed to find NDN router using NDN-FCH service (") + e.what() + ")");
+  }
+}
+
+} // namespace autoconfig
+} // namespace tools
+} // namespace ndn
diff --git a/tools/ndn-autoconfig/ndn-fch-discovery.hpp b/tools/ndn-autoconfig/ndn-fch-discovery.hpp
new file mode 100644
index 0000000..2e587c6
--- /dev/null
+++ b/tools/ndn-autoconfig/ndn-fch-discovery.hpp
@@ -0,0 +1,62 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_TOOLS_NDN_AUTOCONFIG_NDN_FCH_DISCOVERY_HPP
+#define NFD_TOOLS_NDN_AUTOCONFIG_NDN_FCH_DISCOVERY_HPP
+
+#include "base-dns.hpp"
+
+namespace ndn {
+namespace tools {
+namespace autoconfig {
+
+/**
+ * @brief Discovery NDN hub using NDN-FCH protocol
+ *
+ * @see https://github.com/cawka/ndn-fch/blob/master/README.md
+ */
+class NdnFchDiscovery : public Base
+{
+public:
+  /**
+   * @brief Create stage to discover NDN hub using NDN-FCH protocol
+   * @sa Base::Base
+   */
+  NdnFchDiscovery(Face& face, KeyChain& keyChain,
+                  const std::string& url,
+                  const NextStageCallback& nextStageOnFailure);
+
+  void
+  start() override;
+
+private:
+  std::string m_url;
+};
+
+} // namespace autoconfig
+} // namespace tools
+} // namespace ndn
+
+#endif // NFD_TOOLS_NDN_AUTOCONFIG_NDN_FCH_DISCOVERY_HPP
