Mobile website will only load on mobile if connected to WiFi

My Linode-hosted site test.richblockspoorblocks.com won't load on a mobile phone when connected to 3G/4G/LTE/etc. It will only load on mobile if the device is connected to a WiFi network. Any idea how I can fix this?

7 Replies

Mobile providers tend to favor IPv6 over IPv4. I see you have the IPv6 record for test.richblockspoorblocks.com:

$ dig AAAA test.richblockspoorblocks.com +short
2600:3c03::f03c:91ff:fe51:382e

But, port 443 (HTTPS) doesn't seem to be open on that address.

$ nc 2600:3c03::f03c:91ff:fe51:382e 443
2600:3c03::f03c:91ff:fe51:382e: forward host lookup failed: Unknown host

What's probably happening is that the mobile provider is seeing the AAAA record, so it's trying to connect using the address in the AAAA record on port 443, but it's not working.

Might be good to start by making sure that your reverse proxy is listening on not only IPv4, but IPv6 as well.

Thanks. How do I make sure that the reverse proxy is listening on both IPv4 and IPv6?

Thanks. How do I make sure that the reverse proxy is listening on both IPv4 and IPv6?

Should be a quick change in your virtual host file and then a restart of Nginx (assuming you're using that).

Check the listen directive. It should look something like this:

listen [::]:80

or

listen [::]:443

What does yours look like?

Here's mine:

server {
    listen 80;
    listen [::]:80;
    server_name test.richblockspoorblocks.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 default_server ssl;

    server_name test.richblockspoorblocks.com;

    ssl on;
    ssl_certificate /path/to/cert_chain.crt;
    ssl_certificate_key /path/to/*.richblockspoorblocks.com.key;

    error_log /var/log/nginx/debug.log debug;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/django/product_blog;
    }

    location / {
        include         uwsgi_params;
        uwsgi_pass      unix:/home/django/product_blog/product_blog.sock;
    }
}

The SSL-related filepaths are placeholders of course…

Problem solved. Added your lines to each server block.

server {
    listen 80;
    listen [::]:80 ipv6only=on;
    # other stuff
}

server {
    listen 443 default_server ssl;
    listen [::]:443 ipv6only=on;
    # other stuff
}

Awesome :D

Watch setting ipv6only=on, though. You might inadvertently end up preventing IPv4 connections — which means someone who doesn’t have IPv6 access won’t be able to access your site.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct