diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index b349918..0365582 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1819,7 +1819,7 @@ function template_preprocess_page(&$variables) {
   }
 
   $variables['base_path']         = base_path();
-  $variables['front_page']        = url();
+  $variables['front_page']        = \Drupal::url('<front>');
   $variables['language']          = $language_interface;
   $variables['language']->dir     = $language_interface->direction ? 'rtl' : 'ltr';
   $variables['logo']              = theme_get_setting('logo.url');
diff --git a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php
index 39b3f28..010214f 100644
--- a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\Core\StreamWrapper;
 
+use Drupal\Core\Routing\UrlGeneratorTrait;
+
 /**
  * Drupal private (private://) stream wrapper class.
  *
@@ -15,6 +17,8 @@
  */
 class PrivateStream extends LocalStream {
 
+  use UrlGeneratorTrait;
+
   /**
    * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath()
    */
@@ -30,6 +34,6 @@ public function getDirectoryPath() {
    */
   function getExternalUrl() {
     $path = str_replace('\\', '/', $this->getTarget());
-    return url('system/files/' . $path, array('absolute' => TRUE));
+    return $this->url('system.files', ['scheme' => $path], ['absolute' => TRUE]);
   }
 }
diff --git a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php
index 42dd4fd..f04213d 100644
--- a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php
@@ -27,6 +27,6 @@ public function getDirectoryPath() {
    */
   public function getExternalUrl() {
     $path = str_replace('\\', '/', $this->getTarget());
-    return url('system/temporary/' . $path, array('absolute' => TRUE));
+    return $this->url('system.temporary', ['scheme' => $path], ['absolute' => TRUE]);
   }
 }
diff --git a/core/modules/aggregator/aggregator.theme.inc b/core/modules/aggregator/aggregator.theme.inc
index 605025c..d0b7df6 100644
--- a/core/modules/aggregator/aggregator.theme.inc
+++ b/core/modules/aggregator/aggregator.theme.inc
@@ -29,7 +29,7 @@ function template_preprocess_aggregator_item(&$variables) {
   $variables['source_title'] = '';
   $fid = $item->getFeedId();
   if (isset($item->ftitle) && $fid !== NULL) {
-    $variables['source_url'] = url('aggregator/sources/' . $fid);
+    $variables['source_url'] = \Drupal::url('entity.aggregator_feed.canonical', ['feed' => $fid]);
     $variables['source_title'] = String::checkPlain($item->ftitle);
   }
   if (date('Ymd', $item->getPostedTime()) == date('Ymd')) {
diff --git a/core/modules/aggregator/src/Entity/Feed.php b/core/modules/aggregator/src/Entity/Feed.php
index a706470..f8a8f0d 100644
--- a/core/modules/aggregator/src/Entity/Feed.php
+++ b/core/modules/aggregator/src/Entity/Feed.php
@@ -169,7 +169,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
 
     $fields['refresh'] = BaseFieldDefinition::create('list_integer')
       ->setLabel(t('Update interval'))
-      ->setDescription(t('The length of time between feed updates. Requires a correctly configured <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status'))))
+      ->setDescription(t('The length of time between feed updates. Requires a correctly configured <a href="@cron">cron maintenance task</a>.', array('@cron' => \Drupal::url('system.status'))))
       ->setSetting('unsigned', TRUE)
       ->setRequired(TRUE)
       ->setSetting('allowed_values', $period)
diff --git a/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
index 642646a..fdc10dc 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
@@ -17,6 +17,7 @@
 use Drupal\Core\Entity\Query\QueryInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\Core\Routing\UrlGeneratorTrait;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -32,6 +33,8 @@
  */
 class DefaultProcessor extends AggregatorPluginSettingsBase implements ProcessorInterface, ContainerFactoryPluginInterface {
 
+  use UrlGeneratorTrait;
+
   /**
    * Contains the configuration object factory.
    *
@@ -141,7 +144,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
       '#title' => t('Discard items older than'),
       '#default_value' => $this->configuration['items']['expire'],
       '#options' => $period,
-      '#description' => t('Requires a correctly configured <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status'))),
+      '#description' => t('Requires a correctly configured <a href="@cron">cron maintenance task</a>.', array('@cron' => $this->url('system.status'))),
     );
 
     $lengths = array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000);
diff --git a/core/modules/aggregator/src/Tests/AddFeedTest.php b/core/modules/aggregator/src/Tests/AddFeedTest.php
index 61cb0af..8b125ea 100644
--- a/core/modules/aggregator/src/Tests/AddFeedTest.php
+++ b/core/modules/aggregator/src/Tests/AddFeedTest.php
@@ -20,7 +20,7 @@ function testAddFeed() {
     $feed = $this->createFeed();
 
     // Check feed data.
-    $this->assertEqual($this->getUrl(), url('aggregator/sources/add', array('absolute' => TRUE)), 'Directed to correct url.');
+    $this->assertEqual($this->getUrl(), \Drupal::url('aggregator.feed_add', [], ['absolute' => TRUE]), 'Directed to correct url.');
     $this->assertTrue($this->uniqueFeed($feed->label(), $feed->getUrl()), 'The feed is unique.');
 
     // Check feed source.
diff --git a/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php b/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
index d967d1b..745f256 100644
--- a/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
+++ b/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
@@ -53,8 +53,8 @@ public function testBlockLinks() {
     $this->assertText($block->label(), 'Feed block is displayed on the page.');
 
     // Find the expected read_more link.
-    $href = 'aggregator/sources/' . $feed->id();
-    $links = $this->xpath('//a[@href = :href]', array(':href' => url($href)));
+    $href = $feed->url();
+    $links = $this->xpath('//a[@href = :href]', array(':href' => $href));
     $this->assert(isset($links[0]), format_string('Link to href %href found.', array('%href' => $href)));
     $cache_tags_header = $this->drupalGetHeader('X-Drupal-Cache-Tags');
     $cache_tags = explode(' ', $cache_tags_header);
@@ -106,7 +106,7 @@ public function testFeedPage() {
     $this->assertTrue(!empty($titles), 'Source page contains correct title.');
 
     // Find the expected read_more link on the sources page.
-    $href = 'aggregator/sources/' . $feed->id();
+    $href = $feed->url();
     $links = $this->xpath('//a[@href = :href]', array(':href' => url($href)));
     $this->assertTrue(isset($links[0]), String::format('Link to href %href found.', array('%href' => $href)));
     $cache_tags_header = $this->drupalGetHeader('X-Drupal-Cache-Tags');
diff --git a/core/modules/aggregator/src/Tests/AggregatorTestBase.php b/core/modules/aggregator/src/Tests/AggregatorTestBase.php
index 71a0bfe..08583e9 100644
--- a/core/modules/aggregator/src/Tests/AggregatorTestBase.php
+++ b/core/modules/aggregator/src/Tests/AggregatorTestBase.php
@@ -87,7 +87,7 @@ function deleteFeed(FeedInterface $feed) {
   function getFeedEditArray($feed_url = NULL, array $edit = array()) {
     $feed_name = $this->randomMachineName(10);
     if (!$feed_url) {
-      $feed_url = url('rss.xml', array(
+      $feed_url = \Drupal::url('view.frontpage.feed_1', array(
         'query' => array('feed' => $feed_name),
         'absolute' => TRUE,
       ));
@@ -115,7 +115,7 @@ function getFeedEditArray($feed_url = NULL, array $edit = array()) {
   function getFeedEditObject($feed_url = NULL, array $values = array()) {
     $feed_name = $this->randomMachineName(10);
     if (!$feed_url) {
-      $feed_url = url('rss.xml', array(
+      $feed_url = \Drupal::url('view.frontpage.feed_1', array(
         'query' => array('feed' => $feed_name),
         'absolute' => TRUE,
       ));
