Dokploy / Dokploy/dokploy

Hide preview deployments from search engines

Open
#3,767 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

When a preview deployment is made, it's currently open to being scraped by search engines. I think for most people that would not be a good thing.

Generally, preview deployments are intended to be temporary.

Describe the solution you'd like

It would be nice to have an option to prevent search engine indexing for preview deployments. When enabled, add an X-Robots-Tag header with a value of noindex,nofollow to the preview deployments traefik setup.

Describe alternatives you've considered

As a workaround for anyone else who has this requirement you can manually add the header into the traefik yml files. It's manual, but it works.

Follow these steps after creating your preview deployment setup. Then reload Traefik from the Web Server menu.

No-follow middleware (one-time setup)
  • Select Traefik File System from the main menu.
  • Open the dynamic folder, select the middlewares.yml.
  • Add the following middleware:
    http:            # should already exist
      middlewares:   # should already exist
        no-search:
          headers:
            customResponseHeaders:
              X-Robots-Tag: noindex,nofollow
    
Add no-follow middleware to service
  • Select Traefik File System from the main menu.
  • Open the dynamic folder, select the preview config file (something like preview-<app-service>-xyz.yml.
  • Add the no-search middleware (created above):
    http:
      routers:
        preview-app-name-router:
          service: preview-app-name-router
          middlewares:
            - redirect-to-https
            - no-search    # Add this line
          entryPoints:
            - web
        preview-app-name-websecure:
          service: preview-app-name-websecure
          middlewares:
            - no-search    # Add this line
          entryPoints:
            - websecure
    
Additional context

No response

Will you send a PR to implement it?

Maybe, need help

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how preview deployments generate their Traefik configuration, including the dynamic preview config and middleware definitions described in the issue. Determine where an indexing option would be handled and verify that enabled previews receive the requested X-Robots-Tag header in both HTTP and HTTPS routes.

Written by the indexing model from the issue text.

Assessment

Domain
devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.