Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have configured ELB with SSL certificate. Listener configuration for ELB is shown below -- 443 (HTTPS, Certificate: forwarding to 80 (HTTP), 80 (HTTP) forwarding to 80 (HTTP)

Domain Registrar setup with Godaddy CNAME record entry www

There is no entry for A-Name record with my domain

Apache .htaccess setup

RewriteEngine on
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule .* [R=301,L]

When I go to browser and type it is not redirecting it to When I type, it is not redirecting it to

I do not have any VirtualHost setup on ELB EC2 instances.

Can someone help me out to resolve this problem.

share|improve this question
You didn't share your actual domain name, so you'll have to tell us exactly what happens when you go to "" or "". –  Michael Hampton Sep 4 '12 at 18:02

1 Answer 1

Try something like this better under the existing virtual host configuration directive:

RewriteEngine on
RewriteCond %{HTTPS} =off [OR]
RewriteCond %{SERVER_NAME} !
RewriteRule ^.*$ [R=301]
share|improve this answer
I did this settings and I am getting -- Server error The webpage at is currently unavailable. It may be overloaded or down for maintenance. Here are some suggestions: Reload this webpage later. HTTP Error 503 (Service Unavailable): The server is currently unable to handle the request. This code indicates this is a temporary condition, and the server will be up again after a delay. –  Dilip Sep 5 '12 at 8:06
This rule works as was tested. You need to check your other rules so to see that they don't interfere with this one. –  Logic Wreck Sep 5 '12 at 13:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.