# How to have \*\_url generate urls with https:// protocol

**URL:** <https://www.ruby-forum.com/t/how-to-have-url-generate-urls-with-https-protocol/189214>\
**Category:** Ruby\
**Created:** [May 26, 2010, 10:02pm UTC](https://www.ruby-forum.com/t/how-to-have-url-generate-urls-with-https-protocol/189214 "2010-05-26T22:02:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![errolsiegel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c77e96/32.png) [@errolsiegel](https://www.ruby-forum.com/u/errolsiegel)\
**Post date:** [May 26, 2010, 10:02pm UTC](https://www.ruby-forum.com/t/how-to-have-url-generate-urls-with-https-protocol/189214/1 "2010-05-26T22:02:47Z")

</div>

Hello,

I am using \*\_path in views and \*\_url in controllers (with redirect\_to,  
for example). It is my understanding that this is generally considered  
a good practice.

I want to use my app using https, and thought it would work that way as  
long as I loaded the app by browsing to [https://my.app.com](https://my.app.com). However, it  
appears that even if I do this, redirect\_to some\_model\_url generates a  
url with a protocol of https://.

How do I get \*\_url to generate a url with https:// for the protocol?

Regards,  
Errol
