Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task]: Only enable full robots.txt & sitemap on the main domain #15309

Open
2 tasks
diox opened this issue Jan 28, 2025 · 0 comments
Open
2 tasks

[Task]: Only enable full robots.txt & sitemap on the main domain #15309

diox opened this issue Jan 28, 2025 · 0 comments
Labels
needs:info repository:addons-frontend Issue relating to addons-frontend repository:addons-server Issue relating to addons-server

Comments

@diox
Copy link
Member

diox commented Jan 28, 2025

Description

It's technically possible for AMO to be reached through alternative domains (and more of these will be added in the future). We shouldn't enable /robots.txt and the sitemap when domains other than the main addons.mozilla.org one are being used.

There is already a mechanism for the robots.txt part of this, the check needs to be flipped to take other domains into account:

service = request.META['SERVER_NAME'] == settings.SERVICES_DOMAIN
if _service or not settings.ENGAGE_ROBOTS:

Needs to be changed to something like (check SERVER_NAME is updated correctly when other domains are used!):

is_main_domain = request.META['SERVER_NAME'] == settings.DOMAIN
if not is_main_domain or not settings.ENGAGE_ROBOTS:

Note that currently settings.ENGAGE_ROBOTS is also False on dev & stage, by design. That makes this annoying to test for QA.

Acceptance Criteria

Milestones/checkpoints

Preview Give feedback

Checks

  • If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"

┆Issue is synchronized with this Jira Task

@diox diox added needs:info repository:addons-server Issue relating to addons-server repository:addons-frontend Issue relating to addons-frontend labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:info repository:addons-frontend Issue relating to addons-frontend repository:addons-server Issue relating to addons-server
Projects
None yet
Development

No branches or pull requests

1 participant