Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A landing page without having the index.html ext. showing

Featured Replies

Hi,

 

Just a quick question, when I upload, the server will automatically redirect any visitor to the index.html file.

But I've seen on bigger sites that the first page is just the domain name without the index.html extension showing up.

 

How do I do that?

 

Thanks.

  • Author

I have re-named it it index.html

 

So the landing page is: www.example.co.uk/index.html

 

What I want is the landing page to be: www.example.co.uk

  • Author

Did that too. It just automatically sends you to www.example.co.uk/index.html

 

My home site is:

 

jejune-jejune.co.uk

 

enter that add in, it will just go straight to jejune-jejune.co.uk/index.html

  • Author

I'm on vidahost. And I upload it to the web root public_html.

Hi there,

 

The reason for this is simply you have a 301 redirect instigated on your domain. I did a quick check and it returns this:

 

Checked link: http://www.jejune-jejune.co.uk

 

Type of redirect: 301 Moved Permanently

Redirected to: http://www.jejune-jejune.co.uk/index.html/

 

301 Redirects are headers sent to the browser for instructional purposes. Basically if anyone accesses the root domain, http://www.jejune-jejune.co.uk, they are being redirected to the index.html/ page automatically.

 

Depending on your hosting environment this is probably applied in your .htaccess file. If you cannot see this try looking for a setting in your FTP client for "Show hidden files" or similar, as some clients hide it for security or to prevent accidental editing.

 

If you're still stuck, contact your host. This is not usually something that can be setup by accident as it's been specified somewhere, but as I say, it depends on your hosting environment.

 

Hope this helps.

  • Author

Thank you!

 

I will try it out and post how it goes.

Hi,

 

No worries at all. As I say it depends how this 301 has been put in place, whether it's in a .htaccess or via an option in your control panel so have a look around.

 

If you get stuck just reply here and I'll help if I can.

 

Cheers.

how to make 301 redirect using .htaccess put it inside public_html folder

 

RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]

 

u can try this code too in ur .htaccess file

 

how to find .htsccess file on ur server

Edited by sash_oo7

how to make 301 redirect using .htaccess put it inside public_html folder

 

RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]

 

u can try this code too in ur .htaccess file

 

how to find .htsccess file on ur server

 

He already has a 301 redirect in place which is causing his issue. If, as assumed, his issue is that he just wants the root URL to display upon page load, i.e. http://www.yourdomain.com instead of http://www.yourdomain.com/index.html he won't need any redirects in his .htaccess as this is normal behaviour.

 

You're also assuming his hosting/server has mod_rewrite enabled, which some don't, in which case your above code won't work. It's also good practise to initialise the RewriteEngine before writing rules, again assuming mod_rewrite is enabled.

 

Hope this helps, let us know how you get on!

  • Author

Sorry for the delay. Been abit busy. Figured it out though. It was actually my own fault.

 

What I did wrong was zip the folder containing the web files then upload it to the public folder. The mistake I made was to rename the folder containing the web files to index.html, instead of just moving them outside of the zip folder.

 

Thanks for the help, it's much appreciated.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.