diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 4861138..1441e32 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -15,6 +15,7 @@
 use Drupal\Core\Config\Entity\ConfigEntityType;
 use Drupal\Core\DependencyInjection\ClassResolverInterface;
 use Drupal\Core\Entity\Exception\AmbiguousEntityClassException;
+use Drupal\Core\Entity\Exception\InvalidLinkTemplateException;
 use Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Field\BaseFieldDefinition;
@@ -229,6 +230,24 @@ public function clearCachedDefinitions() {
   /**
    * {@inheritdoc}
    */
+  public function processDefinition(&$definition, $plugin_id) {
+    /** @var \Drupal\Core\Entity\EntityTypeInterface $definition */
+    parent::processDefinition($definition, $plugin_id);
+
+    // All link templates must have a leading slash.
+    foreach ($definition->getLinkTemplates() ?: array() as $link_relation_name => $link_template) {
+      if ($link_template[0] != '/') {
+        throw new InvalidLinkTemplateException(SafeMarkup::format('Link template for @relation is missing leading slash: @template.', array(
+          '@relation' => $link_relation_name,
+          '@template' => $link_template,
+        )));
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   protected function findDefinitions() {
     $definitions = $this->discovery->getDefinitions();
 
diff --git a/core/lib/Drupal/Core/Entity/Exception/InvalidLinkTemplateException.php b/core/lib/Drupal/Core/Entity/Exception/InvalidLinkTemplateException.php
new file mode 100644
index 0000000..f64d39f
--- /dev/null
+++ b/core/lib/Drupal/Core/Entity/Exception/InvalidLinkTemplateException.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\Core\Entity\Exception\InvalidLinkTemplateException.
+ */
+
+namespace Drupal\Core\Entity\Exception;
+
+/**
+ * Indicates that a link template does not follow the required pattern.
+ */
+class InvalidLinkTemplateException extends \Exception {
+
+}
