[GH-ISSUE #1230] [BUG] setting the alt reddit link to old.reddit.com causes the url to change to old.old.old.old.old. etc #733

Closed
opened 2026-02-25 20:36:25 +03:00 by kerem · 12 comments
Owner

Originally created by @RoyalOughtness on GitHub (Jun 4, 2025).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/1230

Describe the bug

Image

To Reproduce
Steps to reproduce the behavior:

  1. Set WHOOGLE_ALT_RD=old.reddit.com
  2. Search for something that results in a reddit link
  3. click the link
  4. observe that the url is https://old.old.old.old.old.old.old.old.old.old.reddit.com instead of https://old.reddit.com

Deployment Method

  • Heroku (one-click deploy)
  • Docker
  • run executable
  • pip/pipx
  • Other: [describe setup]

Version of Whoogle Search

  • Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc)
  • Version 0.9.3
  • Not sure
Originally created by @RoyalOughtness on GitHub (Jun 4, 2025). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/1230 **Describe the bug** ![Image](https://github.com/user-attachments/assets/4cdbf48e-abe8-45d7-a29d-abafba2242c5) **To Reproduce** Steps to reproduce the behavior: 1. Set WHOOGLE_ALT_RD=old.reddit.com 2. Search for something that results in a reddit link 3. click the link 4. observe that the url is https://old.old.old.old.old.old.old.old.old.old.reddit.com instead of https://old.reddit.com **Deployment Method** - [ ] Heroku (one-click deploy) - [x] Docker - [ ] `run` executable - [ ] pip/pipx - [ ] Other: [describe setup] **Version of Whoogle Search** - [ ] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc) - [x] Version 0.9.3 - [ ] Not sure
Author
Owner

@allandiegoasilva commented on GitHub (Jul 9, 2025):

I tried to reproduce it and couldn't, could you give an example of the search term?

Look image below that all links is correctly:

Image
<!-- gh-comment-id:3053148107 --> @allandiegoasilva commented on GitHub (Jul 9, 2025): I tried to reproduce it and couldn't, could you give an example of the search term? Look image below that all links is correctly: <img width="2836" height="1634" alt="Image" src="https://github.com/user-attachments/assets/2d102650-f505-438b-ba20-36bc97f6dcff" />
Author
Owner

@RoyalOughtness commented on GitHub (Jul 9, 2025):

@allandiegoasilva Strange. What value do you have set for WHOOGLE_ALT_RD?

could you give an example of the search term?

Any search term that gives reddit results. For example, "reddit"

<!-- gh-comment-id:3053298761 --> @RoyalOughtness commented on GitHub (Jul 9, 2025): @allandiegoasilva Strange. What value do you have set for `WHOOGLE_ALT_RD`? > could you give an example of the search term? Any search term that gives reddit results. For example, "reddit"
Author
Owner

@allandiegoasilva commented on GitHub (Jul 9, 2025):

@RoyalOughtness I followed your steps for reproduce and set environment WHOOGLE_ALT_RD with value old.reddit.com.

How I test it?

  1. First I cloned repository.
  2. I build local whoogle-search docker image with docker build -t whoogle-search:v1.0.0
  3. Change WHOOGLE_ALT_RD in docker-compose.yml with value old.reddit.com
  4. Setup docker with whoogle-search:v1.0.0 image

After it, I have accessed and all look is ok.

<!-- gh-comment-id:3053361390 --> @allandiegoasilva commented on GitHub (Jul 9, 2025): @RoyalOughtness I followed your steps for reproduce and set environment `WHOOGLE_ALT_RD` with value `old.reddit.com`. How I test it? 1. First I cloned repository. 2. I build local `whoogle-search` docker image with `docker build -t whoogle-search:v1.0.0` 3. Change `WHOOGLE_ALT_RD` in `docker-compose.yml` with value `old.reddit.com` 4. Setup docker with `whoogle-search:v1.0.0` image After it, I have accessed and all look is ok.
Author
Owner

@RoyalOughtness commented on GitHub (Jul 9, 2025):

@allandiegoasilva What is v1.0.0? I'm not seeing that tag available on docker. There's latest and 0.9.3.

<!-- gh-comment-id:3053419810 --> @RoyalOughtness commented on GitHub (Jul 9, 2025): @allandiegoasilva What is v1.0.0? I'm not seeing that tag available on docker. There's `latest` and `0.9.3`.
Author
Owner

@RoyalOughtness commented on GitHub (Jul 9, 2025):

@allandiegoasilva oh, I misread. You built locally. Can you try with the 0.9.3 docker image and see if you still can't reproduce?

<!-- gh-comment-id:3053460688 --> @RoyalOughtness commented on GitHub (Jul 9, 2025): @allandiegoasilva oh, I misread. You built locally. Can you try with the 0.9.3 docker image and see if you still can't reproduce?
Author
Owner

@allandiegoasilva commented on GitHub (Jul 9, 2025):

@RoyalOughtness

But you can check my docker-compose.yml:

services:
  whoogle-search:
    image: benbusby/whoogle-search:0.9.3
    container_name: whoogle-search
    restart: unless-stopped
    pids_limit: 50
    mem_limit: 256mb
    memswap_limit: 256mb
    # user debian-tor from tor package
    user: whoogle
    security_opt:
      - no-new-privileges
    cap_drop:
      - ALL
    tmpfs:
      - /config/:size=10M,uid=927,gid=927,mode=1700
      - /var/lib/tor/:size=15M,uid=927,gid=927,mode=1700
      - /run/tor/:size=1M,uid=927,gid=927,mode=1700
    environment:
      - WHOOGLE_ALT_RD=old.reddit.com
    ports:
      - 5000:5000

In my test I got same result, every link is correctly:

Image

Possible solution

  1. Maybe try rebuild image locally and use again.
  2. Remove 0.9.3 image with docker rm image benbusby/whoogle-search:0.9.3 and try again.
  3. Review your environments

If you constate that is only a local problem, could you close the issue?

<!-- gh-comment-id:3053708296 --> @allandiegoasilva commented on GitHub (Jul 9, 2025): @RoyalOughtness But you can check my `docker-compose.yml`: ```yaml services: whoogle-search: image: benbusby/whoogle-search:0.9.3 container_name: whoogle-search restart: unless-stopped pids_limit: 50 mem_limit: 256mb memswap_limit: 256mb # user debian-tor from tor package user: whoogle security_opt: - no-new-privileges cap_drop: - ALL tmpfs: - /config/:size=10M,uid=927,gid=927,mode=1700 - /var/lib/tor/:size=15M,uid=927,gid=927,mode=1700 - /run/tor/:size=1M,uid=927,gid=927,mode=1700 environment: - WHOOGLE_ALT_RD=old.reddit.com ports: - 5000:5000 ``` In my test I got same result, every link is correctly: <img width="500" height="500" alt="Image" src="https://github.com/user-attachments/assets/58711e8c-f3f8-4c37-840e-217a557a37a1" /> ### Possible solution 1. Maybe try rebuild image locally and use again. 2. Remove `0.9.3` image with `docker rm image benbusby/whoogle-search:0.9.3` and try again. 3. Review your `environments` > If you constate that is only a local problem, could you close the issue?
Author
Owner

@RoyalOughtness commented on GitHub (Jul 9, 2025):

@allandiegoasilva Here's my docker-compose. I wonder if the traefik integration is potentially causing issues? Although I don't see why that would be the case:

version: "2.4"

services:
  traefik:
    image: "traefik:v3.4.1"
    container_name: "traefik"
    command:
      - "--providers.docker=true"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.websecure.http.tls=true"
      - "--providers.docker.network=proxy"
      - "--providers.file.filename=/var/home/user/tls.yml"
    ports:
      - "443:443"
      - "8080:8080"
    volumes:
      - "./letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/var/home/user/tls.yml:/var/home/user/tls.yml:ro"
      - "/var/home/user/tls/:/var/home/user/tls:ro"
  whoogle-search:
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`search.whoogle`)"
      - "traefik.http.routers.whoami.entrypoints=websecure"
      - "traefik.http.services.whoogle-search.loadbalancer.server.port=5000"
    image: benbusby/whoogle-search:0.9.3
    container_name: whoogle-search
    restart: unless-stopped
    pids_limit: 50
    mem_limit: 256mb
    memswap_limit: 256mb
    # user debian-tor from tor package
    user: whoogle
    security_opt:
      - no-new-privileges
    cap_drop:
      - ALL
    tmpfs:
      - /config/:size=10M,uid=927,gid=927,mode=1700
      - /var/lib/tor/:size=15M,uid=927,gid=927,mode=1700
      - /run/tor/:size=1M,uid=927,gid=927,mode=1700
    environment: 
      - WHOOGLE_CONFIG_URL=https://search.whoogle
      - HTTPS_ONLY=1
      - WHOOGLE_CONFIG_THEME=dark
      - WHOOGLE_CONFIG_ALTS=1
      - WHOOGLE_ALT_RD=old.reddit.com
    ports:
      - 8000:5000
<!-- gh-comment-id:3053813505 --> @RoyalOughtness commented on GitHub (Jul 9, 2025): @allandiegoasilva Here's my docker-compose. I wonder if the traefik integration is potentially causing issues? Although I don't see why that would be the case: ```yml version: "2.4" services: traefik: image: "traefik:v3.4.1" container_name: "traefik" command: - "--providers.docker=true" - "--entrypoints.websecure.address=:443" - "--entrypoints.websecure.http.tls=true" - "--providers.docker.network=proxy" - "--providers.file.filename=/var/home/user/tls.yml" ports: - "443:443" - "8080:8080" volumes: - "./letsencrypt:/letsencrypt" - "/var/run/docker.sock:/var/run/docker.sock:ro" - "/var/home/user/tls.yml:/var/home/user/tls.yml:ro" - "/var/home/user/tls/:/var/home/user/tls:ro" whoogle-search: labels: - "traefik.enable=true" - "traefik.http.routers.whoami.rule=Host(`search.whoogle`)" - "traefik.http.routers.whoami.entrypoints=websecure" - "traefik.http.services.whoogle-search.loadbalancer.server.port=5000" image: benbusby/whoogle-search:0.9.3 container_name: whoogle-search restart: unless-stopped pids_limit: 50 mem_limit: 256mb memswap_limit: 256mb # user debian-tor from tor package user: whoogle security_opt: - no-new-privileges cap_drop: - ALL tmpfs: - /config/:size=10M,uid=927,gid=927,mode=1700 - /var/lib/tor/:size=15M,uid=927,gid=927,mode=1700 - /run/tor/:size=1M,uid=927,gid=927,mode=1700 environment: - WHOOGLE_CONFIG_URL=https://search.whoogle - HTTPS_ONLY=1 - WHOOGLE_CONFIG_THEME=dark - WHOOGLE_CONFIG_ALTS=1 - WHOOGLE_ALT_RD=old.reddit.com ports: - 8000:5000 ```
Author
Owner

@allandiegoasilva commented on GitHub (Jul 10, 2025):

@RoyalOughtness Thanks for sharing your docker-compose.
I recommend simplifying the setup for initial testing — try running it without Traefik first to reduce variables and confirm the core functionality.
Once it's working properly, you can reintroduce Traefik and test the integration step-by-step.

Thank you,
Allan

<!-- gh-comment-id:3058334635 --> @allandiegoasilva commented on GitHub (Jul 10, 2025): @RoyalOughtness Thanks for sharing your docker-compose. I recommend simplifying the setup for initial testing — try running it without Traefik first to reduce variables and confirm the core functionality. Once it's working properly, you can reintroduce Traefik and test the integration step-by-step. Thank you, Allan
Author
Owner

@RoyalOughtness commented on GitHub (Jul 11, 2025):

@allandiegoasilva I tried with your docker-compose, and the alt link isn't working to begin with. I think the issue is that you're searching with site:old.reddit.com. Try searching without that and let me know what happens. I think you'll find that the alt link isn't used (www.reddit.com isn't changed to old.reddit.com). The goal here isn't to redirect old.reddit.com to old.reddit.com, it's to redirect standard www.reddit.com links to old.reddit.com. Searching with site:old.reddit.com negates this.

<!-- gh-comment-id:3063770543 --> @RoyalOughtness commented on GitHub (Jul 11, 2025): @allandiegoasilva I tried with your docker-compose, and the alt link isn't working to begin with. I think the issue is that you're searching with `site:old.reddit.com`. Try searching without that and let me know what happens. I think you'll find that the alt link isn't used (www.reddit.com isn't changed to old.reddit.com). The goal here isn't to redirect old.reddit.com to old.reddit.com, it's to redirect standard www.reddit.com links to old.reddit.com. Searching with `site:old.reddit.com` negates this.
Author
Owner

@RoyalOughtness commented on GitHub (Jul 14, 2025):

@allandiegoasilva I found another possible clue. This isn't specific to reddit. If I set the wikipedia override to en.wikipedia.org, then this shows:

Image

But the actual url in this case is:

https://en.wikipedia.org/wiki/Linux?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en

There is something off about the alt url handling.

<!-- gh-comment-id:3071307429 --> @RoyalOughtness commented on GitHub (Jul 14, 2025): @allandiegoasilva I found another possible clue. This isn't specific to reddit. If I set the wikipedia override to `en.wikipedia.org`, then this shows: <img width="252" height="92" alt="Image" src="https://github.com/user-attachments/assets/8541b5a6-d0e8-473a-b16e-ce9de110a833" /> But the actual url in this case is: ``` https://en.wikipedia.org/wiki/Linux?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en?lang=en ``` There is something off about the alt url handling.
Author
Owner

@RoyalOughtness commented on GitHub (Jul 16, 2025):

@allandiegoasilva I found and fixed both bugs and some others 😄

traefik was not related. Have a look: https://github.com/benbusby/whoogle-search/pull/1235/

<!-- gh-comment-id:3081677216 --> @RoyalOughtness commented on GitHub (Jul 16, 2025): @allandiegoasilva I found and fixed both bugs and some others 😄 traefik was not related. Have a look: https://github.com/benbusby/whoogle-search/pull/1235/
Author
Owner

@Don-Swanson commented on GitHub (Sep 24, 2025):

This has been incorporated into the Beta release: https://github.com/benbusby/whoogle-search/releases/tag/v1.0.0-beta

Please provide feedback if this is now resolved in beta.

<!-- gh-comment-id:3326548328 --> @Don-Swanson commented on GitHub (Sep 24, 2025): This has been incorporated into the Beta release: https://github.com/benbusby/whoogle-search/releases/tag/v1.0.0-beta Please provide feedback if this is now resolved in beta.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#733
No description provided.