# Route generator using incorrect host

**URL:** <https://www.ruby-forum.com/t/route-generator-using-incorrect-host/171703>\
**Category:** Rails\
**Created:** [July 7, 2009, 11:48pm UTC](https://www.ruby-forum.com/t/route-generator-using-incorrect-host/171703 "2009-07-07T23:48:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timhunter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/71e660/32.png) [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Post date:** [July 7, 2009, 11:48pm UTC](https://www.ruby-forum.com/t/route-generator-using-incorrect-host/171703/1 "2009-07-07T23:48:29Z")

</div>

Hi there,

Two times in the last three months I’ve had Rails start serving up  
some links as .com/page rather than [mysite.com/page](http://mysite.com/page).  
The are sites are completely unrelated to my site, and I have no idea  
why it did it. The first time it occured, the other site was  
[google.com](http://google.com). The second time it was [tragicallynull.com](http://tragicallynull.com). Sadly I can’t  
remember how I resolved it the first time, and the second time it went  
away after I deployed some recent updates I’d made.

Any any know why this would happen, or what might cause it? Perhaps  
even some tests I can run? I’m not even sure how to reproduce it at  
this stage.

Tim.
