diff --git a/CHANGELOG b/CHANGELOG
index b40d1e05ab3d01b829c915364bc0fd90eef2f6b0..52cc8489d4f4f37ea5eadc4fcc5a1e0258fee5d3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,7 @@ v 8.4.0 (unreleased)
   - Add "Frequently used" category to emoji picker
   - Add CAS support (tduehr)
   - Add link to merge request on build detail page
+  - Fix: Problem with projects ending with .keys (Jose Corcuera)
   - Revert back upvote and downvote button to the issue and MR pages
   - Swap position of Assignee and Author selector on Issuables (Zeger-Jan van de Weg)
   - Add system hook messages for project rename and transfer (Steve Norman)
diff --git a/config/routes.rb b/config/routes.rb
index 5b69d06eb7637ffb78f78363a860ec4c652ebabf..4fcea1185c022494cbb1b14da2b51dee0fc42f10 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -52,9 +52,6 @@ Rails.application.routes.draw do
   API::API.logger Rails.logger
   mount API::API => '/api'
 
-  # Get all keys of user
-  get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
-
   constraint = lambda { |request| request.env['warden'].authenticate? and request.env['warden'].user.admin? }
   constraints constraint do
     mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq
@@ -686,5 +683,8 @@ Rails.application.routes.draw do
     end
   end
 
+  # Get all keys of user
+  get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
+
   get ':id' => 'namespaces#show', constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }
 end
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 2a70c190337ef2b3f7337fbce61324192d872e75..22ba25217f0612f492c46818b4589b3ba3998c3a 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -80,6 +80,7 @@ describe ProjectsController, 'routing' do
 
   it 'to #show' do
     expect(get('/gitlab/gitlabhq')).to route_to('projects#show', namespace_id: 'gitlab', id: 'gitlabhq')
+    expect(get('/gitlab/gitlabhq.keys')).to route_to('projects#show', namespace_id: 'gitlab', id: 'gitlabhq.keys')
   end
 
   it 'to #update' do