How to not show fly.io domain on google search
Is there anyone that knows a way such that the fly.io domain is not shown in a google search? i have setup my custom domain..
9 Replies
Hi @Sven. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To prevent your fly.io domain from showing up in Google search results while using your custom domain with a Wasp app, you need to take a few specific steps:
1. Make sure your custom domain is properly set up with Fly.io. Based on the knowledge sources, you should have already:
- Added your domain to your Fly client app
- Added the proper DNS records (A and AAAA)
- Set your custom domain as the
WASP_WEB_CLIENT_URL
environment variable for your server app
Deploying with the Wasp CLI
2. To prevent the fly.io domain from appearing in search results, you should:
- Make sure all your internal links use your custom domain, not the fly.io domain
- Set up proper redirects from the fly.io domain to your custom domain
- Consider adding canonical URL tags in your HTML head to indicate your custom domain is the preferred URL
While the knowledge sources don't specifically address hiding the fly.io domain from Google search results, these are standard SEO practices that should help. You might also want to consider:
- Using Google Search Console to request removal of the fly.io URLs
- Setting up robots.txt on the fly.io domain to discourage crawling
If you're using the OpenSaaS template, you might find additional SEO capabilities there, as mentioned by a community member who had success with Google search rankings even without a dedicated landing page: "A lot of hype around needing SSR for good SEO is exaggerated" and Wasp allows you to add OG tags in the head
property of the main.wasp
file.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sven, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@Sven hello, the bot is right, setting up DNS and Canonical URL right should solve the problem for you. Let us know if you have any questions.
To directly eliminate the root of the problem you can create a small redirection middleware:
And as Franjo has said, add Canonical as well.
what does this do? i already have some redirect when people come on my fly.io domain or is this somethig different?
how do i properly implement this in my code?
also i do not understand how i do that Canonical part....
could you dm me @NEROX
This did not work? The fly domain still pops up even after canonical and using middleware that gives 301
Probably because the domain has found along time ago by google for example
How do i remove this from search results?
You should use Google Search Console: https://search.google.com/search-console/about
Info about Google Search Console: https://support.google.com/webmasters/answer/9128668?hl=en
It always you to track your domain across Google, and also to control it to a degree.
In there you can request google crawler to reindex your page, which will update it with new data. But it's not instant.
All-around good tool to track some google analytics about your website (but less powerful than e.g. google analytics)
About Search Console - Search Console Help
Google Search Console is a free service offered by Google that helps you monitor, maintain, and troubleshoot your site's presence in Google Search results. You don't have to sign up for Search Console
But where do i put the html
Piece of code
To verify
https://wasp.sh/docs/project/customizing-app
title property should work
Customizing the App | Wasp
Each Wasp project can have only one app type declaration. It is used to configure your app and its components.
Wdym with title prporrty?
If you are verifying that you own the domain via the
<meta>
in your websites <head>
element.
e.g. <meta name="google-site-verification" content="PROVIDED_BY_GOOGLE">
You would add it to your main.wasp
like this:
@Sven