0

When a user visits my page through the URL website.com, I want it to be redirected to website.com/keyword1-keyword2/, as I have all the relevant information and SEO power in the index.html file of that directory (i.e. keywords in the directory name relevant for SEO).

I have written an index.html file for the root directory, and made a “Enter Website” button as a link target to the preferred directory. But is there a way I can circumvent this method? I’m aware of the <meta http-equiv="refresh" …> tag, but just wanted to know if there’s another way to accomplish this?

3
  • 1
    Your post is very clear. Is "keyword1-keyword2" a fixed string or does it depend on how they came to the website or what they posted/put in a form to get there? What web server are you using and what framework? There are LOTS of ways to handle redirects.
    – davidgo
    Nov 18 at 3:23
  • Hi David, thanks for your reply. I want to put the keywords in the URL ("keyword1-keyword2"), so I made a directory in Hostinger's file manager with these keywords, as I read that it's good for SEO. I don't use any CMS and write the HTML/CSS myself.
    – Jahan
    Nov 18 at 14:45
  • Ask hostinger if they support .htaccess files - and if so, write some rewrite rules and add to .htaccess. If they don't you may need to use a cdn to do that or consider changing from pure html/css to php + html + css and building a simple framework (eg on php). I would do it using include files but you can also use a redirect header.
    – davidgo
    Nov 18 at 18:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.