diff --git a/config/routes/user.rb b/config/routes/user.rb
index c287039ba2605c6911a4faa71721f8a4d2e4688e..54bbcb18f6a0d70c8c29e4b7dcb428ec0494ad34 100644
--- a/config/routes/user.rb
+++ b/config/routes/user.rb
@@ -15,7 +15,10 @@ devise_scope :user do
 end
 
 constraints(UserUrlConstrainer.new) do
-  scope(path: ':username', as: :user, controller: :users) do
+  scope(path: ':username',
+        as: :user,
+        constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ },
+        controller: :users) do
     get '/', action: :show
   end
 end