Robots.txt will not display

We have been working on improving our SEO. Google search console says that robots.txt does not exist. I checked the public folder and it is there. I am looking at the router.js. We have a “catch all” route that I believe is not displaying the robots.txt. Here is a portion of the router.js:

import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = EmberRouter.extend({
  location: config.locationType,
  rootURL: config.rootURL
});

Router.map(function() {
  this.route('search');
  this.route('login');
  this.route('signup');
 .
 .
  this.route('faq');
  this.route('fees');
  this.route('ratings');
  this.route('terms', {path: 'tos'});
  this.route('privacy');
  this.route('backcountry', {path: '/*path'});   <=====
});

export default Router;

If I go to /robots.txt, I end up on the backcountry page.

How do I get the robots.txt file to display? Thank in advance. Bill

This isn’t something you can control from inside your Ember app. This is controlled by whatever webserver is hosting your production site.

You need to get it to respond with the robots.txt file instead of with the index.html file when somebody visits the /robots.txt URL.

On most web hosting, that would be the default behavior as long as you’re actually deploying the robots.txt file, so I would check that first.

Thank you for the reply. With what you have said, I figured out the problem. We have NGINX as the front end. I have changed the config to nginx so that it sends the robots.txt file.

Thanks again Bill