Skip to main content

Where to Post Robots.txt File on Glassfish Server that Hosts Several Sites?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
supermarioworld
Offline
Joined: 2013-10-04

Hi,

I'm so confused about this "robots.txt" file. My server has on it "WebApplication1" and "WebApplication2" and "WebApplication3" So, in order to access my site, you type "www.[mysite].com/[the specific one] Now, I read through the google stuff about robots.txt and it says that "www.readandwrite.us/robots.txt" is valid and not "readandwrite.us/WebApplication1/robots.txt"

The structure on the file system is like so:

C:\NetbeansProjects
-> WebApplication1
-> WebApplication2
-> WebApplication3

If I place the robots.txt file in C:\NetbeansProjects, when I type "www.readandwrite.us/robots.txt" I get a 404 error (The requested resource () is not available).

So, can someone explain where I should put the robots.txt file on my server?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alex.skorohod
Offline
Joined: 2014-08-28

Hello, I also have such problem so please help us to find solution .

I have app that has controller on */robots.txt requests
but my app cannot get such request through GlassFish and server return 404.
I don't want return on request stable file, I want generate it with my app, what changes I need to do with GlassFish setting, domain.xml configuring ?
Also I have app request controller */sitemap.xml and without any changes in settings I got generated file from my app, so this situation only for robots.txt file !