Github Enforce HTTPS returning - Unavailable for your site because your domain is not properly configured to support HTTPS - redirect

I am trying to do bug bounty, i found a open redirect url. I was able to successfully added subdomain in github but for https it's saying
Unavailable for your site because your domain is not properly configured to support HTTPS
is there any solution for this
I had added a htaccess file containing
RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]

Related

Facebook App Website Platform URL

Ive added my domain, "domain.com", as the site URL in my app settings. When i try use my website by logging onto "domain.com" the facebook features work fine. However, when logging on to "www.domain.com", facebook returns the following error:
Given URL is not allowed by the Application configuration: One or more of the
given URLs is not allowed by the App's settings. It must match the Website URL
or Canvas URL, or the domain must be a subdomain of one of the App's domains.
As suggested, the solution to this problem is to redirect the domain.com version to the www.domain.com to avoid this duplication issue. In order to do this in the .htaccess file the following was added:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
This redirects any user that goes to domain.com to www.domain.com

How to redirect all the http requests to https on zPanel

I've configured a domain using a Positive SSL certificate. My dedicated server runs on CentOS 6 with Apache and zPanel.
I want to redirect all the http pages to https.
I've tried a lot of different codes on .htaccess but none works:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
It looks like it ignores my .htaccess
Try checking if your Apache server has mod_rewrite enabled.
If you have zpanel all set up just login as an admin and go to "Admin > phpinfo > view full php configuration". On the newly opened page scroll down to "apache2handler" and check your mod_ modules.
Ensure your .htaccess is in your web root directory eg. "public_html" nad chmoded to 644.

setup ssl and http redirect to https

Hi im hosting my site in bluehost, I have a problem with http to https redirect. I tried to create a redirect in htaccess and I get a redirect loop. When I remove my htaccess redirect and tried to put https://mysite.com I think it redirects me to http. But I can't seem to find where did that redirect happens, is it possible that it is because of dns record?
UPDATE:
also how can I put the padlock instead of the blank white paper in the browser url.
Try the following:
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Here, we set all visiting browsers to WWW.domainname.ext
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Good luck! I hope this solves your problem.
If there is an A-record on www.yourdomain.com, it will overrule your HTACCESS.

Redirect www to non-www if subdomain

My domain http://vietnam.asiastreetfood.com works fine. But if somebody calls http://www.vietnam.asiastreetfood.com theres an error. I cannot enter www.vietnam as a subdomain at 1und1.de. So any ideas how i can redirect the www to the non-www domain?
This is what i tried:
RewriteCond %{HTTP_HOST} ^www\.vietnam.asiastreetfood\.com [NC]
RewriteRule (.*) http://vietnam.asiastreetfood.com/$1 [R=301,L]
I think that 'www' is technically a subdomain itself or at least a prefix not generally used with a "sub-domain", so in order to get www.sub.domain.com you have to configure a vhost on the server (much more complicated than an htaccess). Here is a Media Temple article I found as a starting point.
But this won't be possible on 1und1.de - you will have to contact their support and see if they can configure this (unlikely).

How to solve a WWW/NonWWW Header Check: FAILED

I ran a duplicate checker for my website and got the following message
WWW/NonWWW Header Check: FAILED Your site is not returning a 301
redirect from www to non-www or vice versa. This means that Google may
cache both versions of your site, causing sitewide duplicate content
penalties.
Is this something that i should be worried about and if so how should i fix it ?
You shouldn't be worried about it, allot of sites are configured that way and google knows that.
However you can still add this if you want to be safe and send your visitors and google always go to example.com instead of www.example.com
Add this to your .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]