Welcome to WebmasterWorld Guest from 54.162.184.214

Forum Moderators: Ocean10000 & incrediBILL & phranque

Apache ssl install question

     
1:13 am on Apr 17, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 19, 2004
posts:820
votes: 10


So I have an apache server and trying to install SSL on it.

In my setup whenever I type example.com in my browser it goes to www.example.com.

Now my question is that if I install SSL I have a redirect for http://www.example.com to https://www.example.com

In this scenario if a user opens example.com would there be 2 redirects then? One to www and other to SSL url?

Is this setup correct? What's the best way to implement SSL in this scenario? Thanks!
1:21 am on Apr 17, 2018 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11293
votes: 135


make sure the redirect to www,example.com specifies the https: schema (protocol).

look for RewriteRule directives in your .htaccess file.
1:30 am on Apr 17, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:11528
votes: 702


@born2run - you keep using the term "SSL"

SSL is no longer used. In fact it is prohibited from use by the Internet Engineering Task Force.

What we use now is TLS. [en.m.wikipedia.org...]
1:48 am on Apr 17, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 19, 2004
posts:820
votes: 10


Ok TLS so two redirects are fine if someone opens browser via example.com ?
2:56 am on Apr 17, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14718
votes: 614


if a user opens example.com would there be 2 redirects then? One to www and other to SSL url?
Only if the site's redirects are ineptly coded. Both should be part of the same redirect, with two [OR]-delimited conditions, assuming you're doing it with a RewriteRule. If the user requests the wrong form of the domain name, and/or they use the wrong protocol, they should be correctly redirected in one fell swoop.
3:04 am on Apr 17, 2018 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11293
votes: 135


so two redirects are fine

no.
make sure the redirect to www.example.com specifies the https: schema (protocol).

look for RewriteRule directives in your .htaccess file.

you don't want one redirect from example.com to http://www.example.com/ and then a subsequent redirect from http://www.example.com/ to https://www.example.com/
4:14 am on Apr 17, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 19, 2004
posts:820
votes: 10


Ok so example.com goes to https://www.example.com
example.net goes to https://www.example.com
www.example.net goes to https://www.example.com

Sounds good?
5:01 am on Apr 17, 2018 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:3724
votes: 205


If you are redirecting example.net to example.com you would use the same type of [OR] condition to rewrite both example.net and www.example.net to the preferred version https://www.example.com by adding that rewrite to the .htaccess file at example.net. That is separate from the canonical/secure rewrite at the example.com domain.
5:07 am on Apr 17, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14718
votes: 614


If example.net is functioning as a typo domain for-insurance-purposes, then it's all good.

Edit: That's assuming the DNS for .com and .net points to the same place. If that's the situation, then you don't even need to add a RewriteCond.
12:47 pm on Apr 17, 2018 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11293
votes: 135


Sounds good?

yes!
7:08 pm on Apr 18, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 19, 2004
posts:820
votes: 10


Thanks tls is working and my other domains are forwarding properly thanks to you guys!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members