diff --git a/config/routes.rb b/config/routes.rb
index 58389d47d134b1054e97801c35c50cd90656c9ee..5e00dfac6056cf00fd0679265ab47f6076cbd85f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -259,6 +259,8 @@
     resources(:groups, only: [:index, :new, :create]) do
       # The constraints ensure that the `group_id` parameter in the URL allows for multiple levels
       # of subgroups, permitting both regular and encoded slashes (%2F).
+      # Deprecated in favor of /groups/*group_id/-/preview_markdown
+      # https://gitlab.com/gitlab-org/gitlab/-/issues/442218
       post :preview_markdown, constraints: { group_id: %r{#{Gitlab::PathRegex.full_namespace_route_regex.source}(%2F#{Gitlab::PathRegex.full_namespace_route_regex.source})*} }
     end
 
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 2de5938a0e7a5551625636346169dd7e8c1850e1..eedad3c014c08174b5a6c64e349265871c574ed5 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -164,6 +164,8 @@
     resources :achievements, only: [:index, :new, :edit]
 
     resources :work_items, only: [:index, :show], param: :iid
+
+    post :preview_markdown
   end
 
   scope(