diff --git a/httpswww.info.yml b/httpswww.info.yml
index 928deb0..b0739ba 100644
--- a/httpswww.info.yml
+++ b/httpswww.info.yml
@@ -1,6 +1,6 @@
 name: 'HTTPS and WWW Redirect'
 type: module
 description: 'Allows for easy configuration of HTTPS and WWW redirects.'
-core_version_requirement: ^8.7.7 || ^9 || ^10 || ^11
+core_version_requirement: ^10.1 || ^11 || ^12
 configure: httpswww.settings
 package: 'Other'
diff --git a/httpswww.module b/httpswww.module
index 28fb253..0fe6e10 100644
--- a/httpswww.module
+++ b/httpswww.module
@@ -4,20 +4,14 @@
  * @file
  * This module enables basic httpswww functionality.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\httpswww\Hook\HttpswwwHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function httpswww_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    // Main module help for the httpswww module.
-    case 'help.page.httpswww':
-      $output = '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('Redirects to HTTPS with or without the "www" prefix.') . '</p>';
-      return $output;
-
-    default:
-  }
+  return \Drupal::service(HttpswwwHooks::class)->help($route_name, $route_match);
 }
diff --git a/httpswww.services.yml b/httpswww.services.yml
index 6321059..68d0fca 100644
--- a/httpswww.services.yml
+++ b/httpswww.services.yml
@@ -4,3 +4,7 @@ services:
     arguments: ['@config.factory', '@current_user']
     tags:
       - { name: 'event_subscriber' }
+
+  Drupal\httpswww\Hook\HttpswwwHooks:
+    class: Drupal\httpswww\Hook\HttpswwwHooks
+    autowire: true
diff --git a/src/EventSubscriber/HttpsWwwRedirectSubscriber.php b/src/EventSubscriber/HttpsWwwRedirectSubscriber.php
index 2ee58da..3920ea7 100644
--- a/src/EventSubscriber/HttpsWwwRedirectSubscriber.php
+++ b/src/EventSubscriber/HttpsWwwRedirectSubscriber.php
@@ -114,7 +114,7 @@ class HttpsWwwRedirectSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Set this to run as early as possible, but after the user authentication.
     $events[KernelEvents::REQUEST][] = ['redirect', 299];
     return $events;
diff --git a/src/Hook/HttpswwwHooks.php b/src/Hook/HttpswwwHooks.php
new file mode 100644
index 0000000..1ee5b02
--- /dev/null
+++ b/src/Hook/HttpswwwHooks.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Drupal\httpswww\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for httpswww.
+ */
+class HttpswwwHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match)
+    {
+        switch ($route_name) {
+            // Main module help for the httpswww module.
+            case 'help.page.httpswww':
+                $output = '<h3>' . $this->t('About') . '</h3>';
+                $output .= '<p>' . $this->t('Redirects to HTTPS with or without the "www" prefix.') . '</p>';
+                return $output;
+            default:
+        }
+    }
+}
