Skip to content

Deindex share URLs from search#2772

Merged
aliabd merged 7 commits into
mainfrom
aliabd/deindex-shares
Dec 9, 2022
Merged

Deindex share URLs from search#2772
aliabd merged 7 commits into
mainfrom
aliabd/deindex-shares

Conversation

@aliabd
Copy link
Copy Markdown
Contributor

@aliabd aliabd commented Dec 8, 2022

Adds /robots.txt to every gradio app (that disallows all) so that it doesn't get indexed by google and show up in searches. Example of indexed links.

@aliabd aliabd requested review from abidlabs and aliabid94 December 8, 2022 06:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 8, 2022

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2772-all-demos

@julien-c
Copy link
Copy Markdown
Contributor

julien-c commented Dec 8, 2022

this should only apply to the apps hosted on *.gradio.app, right? On Spaces (and presumably when people self-host) we want the apps to be indexed...

@aliabd
Copy link
Copy Markdown
Contributor Author

aliabd commented Dec 8, 2022

Yes I was worried about that too, but my understanding is this won't affect spaces since there won't be a /robots.txt route.

But it will affect the <subdomain>.hf.space and it will affect links when users self host, which is a good point. Maybe we do it in the gradio-api-server side only for share links. That will avoid spaces entirely and self hosting, so is probably the right way to go.

@aliabd
Copy link
Copy Markdown
Contributor Author

aliabd commented Dec 9, 2022

Turns out it's non trivial to do this on the api server side so will keep it here. But I changed it to only disallow indexing when share=True which means it shouldn't affect self hosting or spaces.

@aliabd aliabd merged commit 8f8ba68 into main Dec 9, 2022
@aliabd aliabd deleted the aliabd/deindex-shares branch December 9, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants