• 0

Safe way to include Wordpress directory in robots.txt


Question

Hi All,

I've implemented a site with a php front page that pulls in news stories from a Wordpress backend through a simple php script.

The reasoning is that it allows me to have a nice front page which is fixed as far as formatting etc is concerned and rather than have to go and edit html every time i want to update the front page with a new bit of news, i just post a new Wordpress story and the index.php simply pulls it in. This also allows colleagues to post things to our front page without having to worry about HTML.

For security purposes i set up my robots.txt to ignore the wpress directory, however i would like Google to index the news items as well, however as wpress is ignored it wont.

So is there a smarter way of letting Google see the news stores without seeing the wpress directory?

I don't want to have www.mydomain.com/wpress to show up in any search results.

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

*Edit

Re-read your post. Not sure why you wouldn't just use wordpress as your home page, format it as you like and use it for the news feed, then disallow Google from searching the individual posts.

Link to comment
Share on other sites

  • 0

You can use .htaccess to prevent the main /wpress directory from being accessed which would still allow you to access the post itself. OR just edit wpress/index.php so that it's either a blank page or redirects to the main domain itself.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.