I can't get my code to show on the WebView

I can’t get my code to show on the WebView. It continuously says not found but when I copy and paste the code into anther repl it works

Current behavior:

Desired behavior

Repl link:

code snippet

Can you please share your Repl link?

But I think I know what your problem is:

When you run your Repl in the webview by default, it’s trying to pull up the root of your website. The “root” is basically just the / path of your website. So basically, the file that is shown at that slash path is called index.html. So your homepage should be named index.html if you want it to show when you run the Repl. Running it in WebView will pull up your index.html file, not the file you’re currently looking at.



That link is a 404. Can you please try again? Is the repl private?

1 Like

It could be Teams for Edu as well

1 Like

Did you try my recommendation?

1 Like

I did try your recommendation and that wasn’t the problem. Not even my index.html will show in the web view section. I copied the code into my windows notes and saved the pages as a .html file and they worked then. So this has to be a problem with replit. This is also for a class in college so the repl is probably private as it was shared with me.

Hi @BenSullivanF23 !
Could you send the code of the main file and the file structure here?
Enclose you code like this:

code here


This project has multiple folders/pages as well. How should I send all of this?

Yes, it would be best if you did.

For reference before I send the code this is what I am looking at. The folders on the left are all different pages with their own unique html code. So far I have worked on style.html and index.html.

@BenSullivanF23 You need to move index.html out of any folder for the program to work, and then redirect accordingly.
index.html needs to not be put in any directory to work.

What is a directory?

A directory is basically a folder, like pages in your repl.

Also, where do I pull the index.html file to? I tried dragging it out of the stylesheets directory but I can’t place it anywhere besides a place with a directory

You have to reschedule index.html beyond all folders in your repl.

Thank you so much! This fixed it and I can’t thank you enough!

You can mark this post as a solution. Then other users who encounter the same problem will know what to do.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.