diff --git a/config/install/redirect.domain.yml b/config/install/redirect.domain.yml
new file mode 100644
index 0000000..08c7d6c
--- /dev/null
+++ b/config/install/redirect.domain.yml
@@ -0,0 +1,4 @@
+domain_redirects:
+  -
+    from: abc.example.org
+    to: www.example.org/abc
diff --git a/config/schema/redirect.schema.yml b/config/schema/redirect.schema.yml
index 1a521a6..d355b7f 100644
--- a/config/schema/redirect.schema.yml
+++ b/config/schema/redirect.schema.yml
@@ -45,4 +45,19 @@ redirect.settings:
       label: 'Set Content Location Header'
     term_path_handler:
       type: boolean
-      label: 'Taxonomy Term Path Handler'
\ No newline at end of file
+      label: 'Taxonomy Term Path Handler'
+
+redirect.domain:
+  type: config_entity
+  label: 'Redirect domains'
+  mapping:
+    domain_redirects:
+      type: sequence
+      label: 'Domain redirects'
+        sequence:
+          from:
+            type: string
+            label: 'From domain'
+          to:
+            type: string
+            label: 'To domain'
diff --git a/redirect.links.task.yml b/redirect.links.task.yml
index 1098fc5..6ac5dff 100644
--- a/redirect.links.task.yml
+++ b/redirect.links.task.yml
@@ -14,3 +14,9 @@ redirect.fix_404:
   base_route: redirect.list
   title: Fix 404 pages
   weight: 30
+
+redirect.domain_redirect:
+  title: 'Domain Redirects'
+  base_route: redirect.list
+  route_name: redirect.domain_redirect
+  weight: 60
diff --git a/redirect.routing.yml b/redirect.routing.yml
index 36b433d..08ee0ef 100644
--- a/redirect.routing.yml
+++ b/redirect.routing.yml
@@ -54,6 +54,14 @@ redirect.fix_404:
   requirements:
     _permission: 'administer redirects'
 
+redirect.domain_redirect:
+  path: '/admin/config/search/redirect/domain'
+  defaults:
+    _title: 'Domain redirect'
+    _form: '\Drupal\redirect\Form\RedirectDomainForm'
+  requirements:
+    _permission: 'administer redirects'
+
 #redirect.devel_generate:
 #  requirements:
 #    _module_dependencies: 'devel'
diff --git a/src/EventSubscriber/RedirectRequestSubscriber.php b/src/EventSubscriber/RedirectRequestSubscriber.php
index cacd951..4d3bca2 100644
--- a/src/EventSubscriber/RedirectRequestSubscriber.php
+++ b/src/EventSubscriber/RedirectRequestSubscriber.php
@@ -131,6 +131,30 @@ class RedirectRequestSubscriber implements EventSubscriberInterface {
       return;
     }
 
+    // Redirect between domains.
+    $from_domain = $request->getUri();
+    $domains = \Drupal::config('redirect.domain')->get('domain_redirects');
+    $to_domain = NULL;
+    // Removes HTTP prefix.
+    if (strpos($from_domain, 'http://') !== FALSE) {
+      $from_domain = substr($from_domain, 7);
+    }
+    if (strpos($from_domain, 'https://') !== FALSE) {
+      $from_domain = substr($from_domain, 8);
+    }
+    // Checks if there is a redirect domain in the configuration.
+    foreach ($domains as $domain) {
+      if ($domain['from'] == $from_domain) {
+        $to_domain = $domain['to'];
+        break;
+      }
+    }
+    if ($to_domain) {
+      $response = new TrustedRedirectResponse($to_domain);
+      $event->setResponse($response);
+      return;
+    }
+
     // Get URL info and process it to be used for hash generation.
     parse_str($request->getQueryString(), $request_query);
 
diff --git a/src/Form/RedirectDomainForm.php b/src/Form/RedirectDomainForm.php
new file mode 100644
index 0000000..5607db4
--- /dev/null
+++ b/src/Form/RedirectDomainForm.php
@@ -0,0 +1,107 @@
+<?php
+
+namespace Drupal\redirect\Form;
+
+use Drupal\Core\Form\ConfigFormBase;
+use Drupal\Core\Form\FormStateInterface;
+
+class RedirectDomainForm extends ConfigFormBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormId() {
+    return 'form_redirect_domain_form';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getEditableConfigNames() {
+    return [
+      'redirect.domain',
+    ];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
+
+    $domain_redirects = \Drupal::config('redirect.domain')->get('domain_redirects');
+    $form['redirects'] = [
+      '#type' => 'table',
+      '#header' => ['From domain', 'To domain'],
+    ];
+    $rows = [];
+    foreach ($domain_redirects as $domain_redirect) {
+      $rows[] = [
+        'from' =>$domain_redirect['from'],
+        'to' => $domain_redirect['to'],
+      ];
+    }
+    $form['redirects']['#rows'] = $rows;
+    $form['redirect'] = [
+      '#type' => 'fieldset',
+      '#attributes' => ['class' => 'container-inline'],
+    ];
+    $form['redirect']['from'] = [
+      '#type' => 'textfield',
+      '#title' => 'From',
+      '#size' => 30,
+    ];
+    $form['redirect']['to'] = [
+      '#type' => 'textfield',
+      '#title' => 'To',
+      '#size' => 30,
+    ];
+    $form['submit'] = [
+      '#type' => 'submit',
+      '#value' => 'Save'
+    ];
+
+    return $form;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function validateForm(array &$form, FormStateInterface $form_state) {
+    parent::validateForm($form, $form_state);
+    $from = $form_state->getValues()['from'];
+    $to = $form_state->getValues()['to'];
+    if (empty($from)) {
+      $form_state->setErrorByName('from', 'The from domain must not be empty.');
+    }
+    if (empty($to)) {
+      $form_state->setErrorByName('to', 'The to domain must not be empty.');
+    }
+    /*if (!preg_match('/^[a-z0-9.-]*$/', $from)) {
+      $form_state->setErrorByName('from', 'Invalid hostname.');
+    }
+    if (!preg_match('/^[a-z0-9.-]*$/', $to)) {
+      $form_state->setErrorByName('to', 'Invalid hostname.');
+    }*/
+
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    $domain_redirects = [];
+    $domain_config = \Drupal::configFactory()->getEditable('redirect.domain');
+    foreach ($form['redirects']['#rows'] as $redirect) {
+      $domain_redirects[] = [
+        'from' => $redirect['from'],
+        'to' => $redirect['to'],
+      ];
+    }
+    $domain_redirects[] = [
+      'from' => $form_state->getValues()['from'],
+      'to' => $form_state->getValues()['to'],
+    ];
+    $domain_config->set('domain_redirects', $domain_redirects);
+    $domain_config->save();
+  }
+}
diff --git a/src/Tests/GlobalRedirectTest.php b/src/Tests/GlobalRedirectTest.php
index 782b88b..676a69f 100644
--- a/src/Tests/GlobalRedirectTest.php
+++ b/src/Tests/GlobalRedirectTest.php
@@ -215,4 +215,22 @@ class GlobalRedirectTest extends WebTestBase {
 
     $this->assertEqual($headers[0][':status'], $expected_ending_status);
   }
+
+  /**
+   * Tests domain redirect.
+   */
+  public function testDomainRedirect() {
+    $user = $this->drupalCreateUser([
+      'administer site configuration',
+      'access administration pages',
+      'administer redirects'
+    ]);
+    $this->drupalLogin($user);
+    $redirect = \Drupal::request()->getUri();
+    $this->drupalGet('/admin/config/search/redirect/domain');
+    $this->assertText('abc.example.org');
+    $this->assertText('www.example.org/abc');
+    // $this->drupalGet('http://abc.example.org');
+    // $this->assertEqual('http://www.example.org/abc', \Drupal::request()->getUri());
+  }
 }
