Walletwasabi: [1.1.10] Website duplicate subdomains (www and non-www)

Created on 6 Dec 2019  Â·  16Comments  Â·  Source: zkSNACKs/WalletWasabi

PR | Description | Win | Mac | Lin
-- | -- | -- | -- | --
18 | Check the new website, click everywhere, on mobile, in onion browser. | ✗  | |  ✗

www and non-www version of the website are both online. This makes duplicated content, bad for UX and SEO. We need to redirect all traffic to www or non-www

www and non-www

debug

Most helpful comment

I am not sure we want to touch the dns records. What about using nginx configuration for this?

server {
listen 80;
server_name www.wasabiwallet.io;
return 301 http://wasabiwallet.io$request_uri;
}

@molnard
Yes, what Lucas just posted is the way. No need to touch dns records.


server {
listen 80;
listen 443 ssl;
server_name www.wasabiwallet.io;
return 301 https://wasabiwallet.io$request_uri;
}


then of course, systemctl restart nginx

All 16 comments

I think a 301 redirect to non-www makes sense, as I believe the trend is away from using www. It's my understanding that the chrome browser will soon (if not already in the latest build) show only non-www URL's in the address bar. If someone asks for a www address, the address bar will truncate the "www" and just show the actual domain + whatever else is part of the desired location

I think a 301 redirect to non-www makes sense, as I believe the trend is away from using www. It's my understanding that the chrome browser will soon (if not already in the latest build) show only non-www URL's in the address bar. If someone asks for a www address, the address bar will truncate the "www" and just show the actual domain + whatever else is part of the desired location

I agree with you.

I didn't even know that there is a different between [non] www :smile:

1 point

I didn't even know that there is a different between [non] www smile

1 point

Yeah, and Google will split any SEO "juice" your site has between the two addresses, effectively cutting your SEO power in half. And, thank you!

@davterra can you give me hand? Now we have this configuration:
image

I am not sure we want to touch the dns records. What about using nginx configuration for this?

server {
listen 80;
server_name www.wasabiwallet.io;
return 301 http://wasabiwallet.io$request_uri;
}

I am not sure we want to touch the dns records. What about using nginx configuration for this?

server {
listen 80;
server_name www.wasabiwallet.io;
return 301 http://wasabiwallet.io$request_uri;
}

@molnard
Yes, what Lucas just posted is the way. No need to touch dns records.


server {
listen 80;
listen 443 ssl;
server_name www.wasabiwallet.io;
return 301 https://wasabiwallet.io$request_uri;
}


then of course, systemctl restart nginx

Can you do this @lontivero?

Guys, this is what we have now: as before, if we GET http://www.wasabiwallet.co we are redirected to https://www.wasabiwallet.co (http to https). After that there is another redirection from https://www.wasabiwallet.co to https://wasabiwallet.co.

Obviously if we request https://www.wasabiwallet.co there is only one redirection because it is already over SSL.

This double redirection (http -> https and then https://www.wa.... -> https://wa..) could be unified in just one but I think that would require bigger changes. What do you think? Btw, could someone else test this in testnet (.co).

$ curl -L --head -X GET http://www.wasabiwallet.co
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Tue, 21 Jan 2020 18:31:50 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.wasabiwallet.co/

HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Tue, 21 Jan 2020 18:31:52 GMT
Content-Type: text/html
Content-Length: 194
Connection: keep-alive
Location: https://wasabiwallet.co/

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 21 Jan 2020 18:31:53 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Note for @nopara73: I know the documentation has to be updated.

@lontivero ACK, let's redirect everything to https:// non-www.

Please double check that the ssl certificate is correct (non-www version or *.wasabiwallet.io).

Please double check that the ssl certificate is correct

Not sure to understand. Are sure saying that something is wrong?

It looks as though your SSL cert is good for either www or non-www.
Checking cert for both addresses shows common fingerprint
wasabcert
I would expect that from DigiCert.
Certs issued by LetsEncryt, from what I've seen, often do not automatically cover both, in which case a redirect to the "wrong" one causes a security warning to the user.

I am not sure we want to touch the dns records. What about using nginx configuration for this?

I am not sure we want to touch any of those for this:)

As it was discussed, having only one domain avoids the duplication of content what doesn't like to search engines.
Also, it is a bit risky because the config in production is complex and it could require try and error loop.

This was implemented in the test server. Should I revert that? @nopara73

I think you are in a better position making this call. nginx is a beast, I would personally not touch it for SEO, however if you feel comfortable and sure about what you do then please implement it on the mainnet server, too, while not neglecting to update the backend deployment documentation.

@lontivero tried to deploy this on Testnet, it was complicated and can break things. So we decided not to touch it in the favor of stability.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nopara73 picture nopara73  Â·  3Comments

2pac1 picture 2pac1  Â·  3Comments

yahiheb picture yahiheb  Â·  3Comments

the-metalworker picture the-metalworker  Â·  3Comments

molnard picture molnard  Â·  3Comments