diff --git a/robotstxt.admin.inc b/robotstxt.admin.inc
index d2a578e..49efda9 100644
--- a/robotstxt.admin.inc
+++ b/robotstxt.admin.inc
@@ -22,3 +22,243 @@ function robotstxt_admin_settings() {
 
   return system_settings_form($form);
 }
+
+/**
+ * Form builder callback
+ *
+ * @param $form
+ * @param $form_state
+ * @return mixed
+ */
+function robotstxt_multisite_settings($form, &$form_state) {
+  // Check root settings
+  // - check main robots.txt file existence
+  // - suggest necessary server updates
+  $form['root'] = array(
+    '#type' => 'fieldset',
+    '#title' => 'Main robots.txt file',
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE,
+  );
+
+  $fe = file_exists(DRUPAL_ROOT . "/robots.txt");
+  $form['root']['file'] = array(
+    '#type' => 'markup',
+    '#prefix' => '<div class="messages ' . ($fe ? 'status' : 'warning') .  '">',
+    '#markup' => t('System-wide file <b>robots.txt</b> @status', array('@status' => $fe ? "exists." : "does not exist. PLEASE, RESTORE THE FILE!")),
+    '#suffix' => '</div>',
+  );
+
+
+  preg_match('/apache|nginx/i', $_SERVER['SERVER_SOFTWARE'], $matches);
+  $server = !empty($matches[0]) ? strtolower($matches[0]) : FALSE;
+  if ($suggestion = _robotstxt_server_suggestions($server)) {
+    $form['root']['software'] = array(
+      '#type' => 'item',
+      '#prefix' => '<b>',
+      '#title' => t('Web server:'),
+      '#markup' => t('<b>@server</b>', array('@server' => $_SERVER['SERVER_SOFTWARE'])),
+      '#suffix' => '</b>',
+    );
+    $form['root']['suggestion'] = array(
+      '#type' => 'markup',
+      '#prefix' => '<p>',
+      '#markup' => t('In order for multisite setting to work, and to keep the main <b>robots.txt</b> file in place, ' . $suggestion['message'], array('%file' => $suggestion['file'])),
+      '#suffix' => '</p>' . $suggestion['code'],
+    );
+    $form['root']['note'] = array(
+      '#type' => 'markup',
+      '#prefix' => '<div class="messages warning">',
+      '#markup' => t("Note, that for this to work, each site's public file system path should be following same naming pattern, e.g. <b>sites/SITE-NAME/FILES-PATH</b>. <br>The module also assumes that public file system path for the <em>default</em> site is in <em>sites/default/files</em>. To override default public file system path update <b>'robotstxt_override_default'</b> variable with the correct value."),
+      '#suffix' => '</div>',
+    );
+  }
+  else {
+    $form['root']['software'] = array(
+      '#type' => 'markup',
+      '#prefix' => '<div class="messages error">',
+      '#markup' => t('Could not identify server software, or server software is not supported. Only Apache and Nginx are supported.'),
+      '#suffix' => '</div>',
+    );
+  }
+
+  // Build a table
+  $marker = _robotstxt_check_marker();
+
+  $rows = array(
+    0 => array(
+      'data' => array(
+        array('data' => $marker['site']),
+        array('data' => $marker['original'] ? 'NO' : 'YES'),
+        array('data' => $marker['path']),
+        array('data' => $marker['exists'] ? 'OK' : 'Missing'),
+      ),
+      'no_striping' => TRUE,
+      'class' => $marker['exists'] ?  'ok' : 'error',
+    )
+  );
+
+  $form['markers'] = array(
+    '#theme' => 'table',
+    '#header' => array('Site / Configurtion Folder', 'Alias', 'Marker file path', 'Status'),
+    '#rows' => $rows,
+  );
+
+  $form['actions'] = array('#type' => 'actions');
+  if (!$marker['exists']) {
+    $form['actions']['generate'] = array(
+      '#type' => 'submit',
+      '#value' => t('Generate marker'),
+      '#submit' => array('robotstxt_multisite_settings_submit_generate'),
+    );
+  }
+  else {
+    $form['actions']['delete'] = array(
+      '#type' => 'submit',
+      '#value' => t('Delete marker'),
+      '#submit' => array('robotstxt_multisite_settings_submit_delete'),
+    );
+  }
+
+  return $form;
+}
+
+/**
+ * Submit callback
+ *
+ * @param $form
+ * @param $form_state
+ */
+function robotstxt_multisite_settings_submit_generate($form, &$form_state) {
+  $marker = _robotstxt_check_marker();
+  if (!$marker['exists']) {
+    if (!touch($marker['path'])) {
+      drupal_set_message(t('Could not create file !file', array('!file' => $marker['path'])), 'error');
+    }
+  }
+}
+
+function robotstxt_multisite_settings_submit_delete($form, &$form_state) {
+  $marker = _robotstxt_check_marker();
+  if ($marker['exists']) {
+    if (!unlink($marker['path'])) {
+      drupal_set_message(t('Could not create file !file', array('!file' => $marker['path'])), 'error');
+    }
+  }
+}
+
+/**
+ * Generates a list of marker files and checks their existence.
+ *
+ * Marker files are necessary for Apache/Nginx to craft a special request so that the
+ * module could return custom robots.txt file. Each file is associated with the site name,
+ * either original or an alias defined in sites.php.
+ *
+ * @return array Array of marker files data. Each entry contains the following:
+ *   - original: bool, whether this file is placed in the conf folder or is an alias
+ *   - sites: bool, whether this file is created for a alias defined in sites.php
+ *   - file: string, file path relative to the DRUPAL_ROOT
+ *   - exists: bool. whether file exists or not
+ */
+function _robotstxt_check_marker() {
+  global $base_url;
+
+  $conf_dir = conf_path();
+  $site_dir = substr(conf_path(), 6);
+  $host = parse_url($base_url, PHP_URL_HOST);
+  $fs =  realpath(DRUPAL_ROOT . DIRECTORY_SEPARATOR . variable_get('file_public_path', $conf_dir . '/files'));
+
+  $marker = array(
+    'site' => $site_dir,
+    'original' => TRUE,
+  );
+
+  // If $host matches $conf_dir - we got direct hit to the site folder!
+  if ($host === $site_dir) {
+    $marker['path'] = $fs . DIRECTORY_SEPARATOR . '.robotstxt';
+  }
+  else if ('default' === $site_dir) {
+    $marker['path'] = $fs . DIRECTORY_SEPARATOR . ".{$host}.robotstxt";
+    $marker['original'] = FALSE;
+  }
+  else {
+    // Look for suggested default folder
+    $default = variable_get('robotstxt_override_default', 'sites/default/files');
+    $fs = realpath(DRUPAL_ROOT . DIRECTORY_SEPARATOR . $default);
+    $marker['path'] = $fs . DIRECTORY_SEPARATOR . ".{$host}.robotstxt";
+    $marker['original'] = FALSE;
+  }
+
+  $marker['exists'] = file_exists( $marker['path']);
+
+  return $marker;
+}
+
+/**
+ * Helper function
+ * Provides suggestions for server configuration changes
+ *
+ * @param string $server Server name in lower case
+ * @return bool|string[] Suggested server data, or FALSE
+ */
+function _robotstxt_server_suggestions($server) {
+  $suggestions = array(
+    'apache' => array(
+      'file' => '.htaccess',
+      'message' => 'the following addition to your %file file is necessary:',
+      'code' => "<pre>
+RewriteCond %{REQUEST_URI} ^/robots.txt$
+RewriteCond %{DOCUMENT_ROOT}/sites/%{HTTP_HOST}/files/.robotstxt -f [OR]
+RewriteCond %{DOCUMENT_ROOT}/sites/default/files/.%{HTTP_HOST}.robotstxt -f
+RewriteRule ^ index.php?q=robots.txt [L]
+</pre>",
+    ),
+    'nginx' => array(
+      'file' => 'rules',
+      'message' => 'the following update to your %file file is necessary:',
+      'code' => '<pre>
+location = /robots.txt {
+    allow all;
+    log_not_found off;
+    access_log off;
+    if (-f $document_root/sites/$host/files/.robotstxt) {
+        rewrite ^ /index.php?q=robots.txt;
+    }
+    if (-f $document_root/sites/default/files/.$host.robotstxt) {
+        rewrite ^ /index.php?q=robots.txt;
+    }
+}
+</pre>',
+    )
+  );
+  return isset($suggestions[$server]) ? $suggestions[$server] : FALSE;
+}
+
+
+/**
+ * Checks whether the default folder exists
+ *
+ * * Should the check for the /sites/default/[files] folder fail - aliases will not be recognized
+ *
+ * The web server and Drupal do not share information about Drupal's file system, neither for
+ * single site nor multi-site configuration. In order to do our best and allow the web server
+ * to recognize aliased web sites, we are making the following assumptions:
+ * - /sites/default folder exists
+ * - /sites/default/[files] public file system folder exists and is writable, where we assume
+ *   that [files] part is the standard and is the same for any other site on the platform. There
+ *   is no true reason to have this configured differently.
+ *
+ * Further, we will use default public file system folder to store alias-specific markers thus
+ * allowing the web server check against this markers for sites which are accessed via an alias.
+ *
+ * !!! IT IS STRICTLY REQUIRED FOR THE MULTI-SITE ENVIRONMENT TO HAVE STANDARD  !!!
+ *     PUBLIC FILE SYSTEM FOLDER SETTING, OTHERWISE THIS MODULE IS
+ *     LIMITED IN ITS ABILITY TO RESOLVE ROBOTS.TXT SETTINGS CORRECTLY.
+ *
+ * @return boolean TRUE is folder exists, FALSE otherwise
+ */
+function _robotstxt_check_default_folder() {
+  $fs = variable_get('robotstxt_platform_site_filesystem', '/files');
+  $dir = join(DIRECTORY_SEPARATOR, array(DRUPAL_ROOT,'sites','default', $fs));
+  return is_dir($dir) && is_writable($dir);
+}
diff --git a/robotstxt.module b/robotstxt.module
index 6e23fd6..61a660f 100644
--- a/robotstxt.module
+++ b/robotstxt.module
@@ -27,6 +27,10 @@ function robotstxt_permission() {
       'title' => t('Administer robots.txt'),
       'description' => t('Perform maintenance tasks for robots.txt.'),
     ),
+    'administer multisite robots.txt' => array(
+      'title' => t('Administer multisite robots.txt'),
+      'description' => t('Perform maintenance tasks for robots.txt in a multisite environment.'),
+    ),
   );
 }
 
@@ -47,6 +51,20 @@ function robotstxt_menu() {
     'access arguments' => array('administer robots.txt'),
     'file' => 'robotstxt.admin.inc',
   );
+  $items['admin/config/search/robotstxt/content'] = array(
+    'title' => 'Content',
+    'description' => 'Manage contents of your robots.txt file.',
+    'type' => MENU_DEFAULT_LOCAL_TASK
+  );
+  $items['admin/config/search/robotstxt/multisite'] = array(
+    'title' => 'Multisite Support',
+    'description' => 'Manage robots.txt file multisite support.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('robotstxt_multisite_settings'),
+    'access arguments' => array('administer multisite robots.txt'),
+    'file' => 'robotstxt.admin.inc',
+    'type' => MENU_LOCAL_TASK
+  );
 
   return $items;
 }
