View Full Version : Hiding Source Codes
multilingual
6th October 2005, 17:10
Is there any html I can add to my site to block anyone viewing the source code?
I have been told that it is impossible to do this on an open site, but just wondered?
JB
Rob Holmes
6th October 2005, 17:23
JB - there are ways of manipulating what source code your visitors see but you will jeapordise your SEO which ids probably the thing you are likely to be trying to protect!
What is making you think down this route? (I ask because there maybe other solutions)
Rob
webit
6th October 2005, 17:29
I've always had a thought that it could be done by rendering the page and then using innerhtml to rewrite the html tags that created the page but I've never tried it? any thoughts anyone?
Sounds a bit barmy I know!
TWD-Tony
6th October 2005, 17:30
It's possible to encrypt your source code so that it looks like total rubbish to anyone trying to view it - you can even leave the <head> un-encrypted so that SE's can still read your meta data, this (as explained above) is still not ideal as far as ranking is concerned though - your content is important to SE's too.
May we ask WHY you should want to hide the source code?
I'm not to experienced with encrypting HTML - I have used encryption on PHP code though with great success!
Rob Holmes
6th October 2005, 17:39
Anyone will still be able to get your keywords etc if they are determined enough!
Another way I would not recommend is to have a browser sniffer embedded in an include on your index page that displays 1 page for search engine spiders and 1 page for normal browsers.
Very dodgy and could get you banned from the Search engines if messed up!
Rob
DuaneJackson
6th October 2005, 19:23
Bottom line is there is no way to hide your source code from those determined to get it.
webit
6th October 2005, 19:48
There is an old trick of loads of blank lines at the top of the html source so people viewing source think its a blank page.
gary
6th October 2005, 21:15
Simple answer is no, it can't be done. There are Javascripts you can use so when someone right-clicks on the page it pops up a message instead, but it's all a bit pointless.
multilingual
6th October 2005, 21:50
Thanks for all the feedback on this point.
For those who are interested, I want to stop the competition from seeing my keywords. It took me a long time, and a lot of research, to find keyphrases that are in demand with a low supply. No point giving that info away if I can help it.
I have one site that is getting mega traffic and I know it is because I have very well targetted keywords.
JB
gary
7th October 2005, 09:34
If you're talking about the keywords in your meta tags, then I'm afraid your fears are for nothing. The keywords tag is barely used anymore (if at all), and the description tag can easily be identified simply by searching for that page on Google. So there's nothing to hide really!
multilingual
7th October 2005, 09:57
Thanks Gary,
The keywords tag is barely used anymore (if at all)
can you expand on this a little?
JB
gary
7th October 2005, 10:01
The meta tag starting <meta name="keywords" content=" is pretty much irrelevant now. In the very old days it was used by search engines to determine what your site was about - these days they use the page title and the content on the page, so the keywords tag is mostly defunct now.
DuaneJackson
7th October 2005, 10:04
keyowrds are the old way of doing things. Altavista for instance based it's results on the keywords on pages. Those type of search engines are "meta" serach engines.
The reason google blew everyone else out of the water was because it ditched the idea of just using keywords (A system open to abuse and responsible for xxx pages coming up for every search in 98-99) and went for the algorithmic approach. There are now dozens (if not hundreds) of elements that come into play to determine your ranking. Meta tags and keywords being a very minor element.
multilingual
7th October 2005, 10:34
I see.
But if I understand it correctly, I am not going to be penalised for having a meta keyword tag, and if some search engines still base their listings on them then I would assume that it is better to have one than to not. If I am picked up by an old meta engine then this may result in a few visitors there.
Like you say, there are hundreds of elements that make a difference to a page listing, but surely the meta tag is one of them?
JB
DuaneJackson
7th October 2005, 10:52
you wont be penalised, especially not if it's relevant. It can't do any harm to have it but it's not going to be your secret weapon in terms of getting traffic. Fewer and fewer engines base their results purely on meta tags (if any - I'm sure someone else will confirm).
Yep, as i said, it is one of the factors but a very minor one. The contents of your pages, who is linking to you, what the sites linking to you are about, what the links say in the anchor text, the title tag of your page - all of these are more relevant than your meta keywords.
multilingual
7th October 2005, 10:59
OK understood :)
Slightly off topic, but you mentioned about incoming links. I agree that it is better to have a relevant incoming link, but we have no control over who links to our sites and so we can't be penalised for having a porno site linking to us can we?
If that was the case, we could all sabotage our competitors sites by bombarding them with crap links.
Surely it is more important to be sure that our outbound links are relative?
JB
DuaneJackson
7th October 2005, 11:07
true, the official line is that you can't get penalised for it for exactly the reason you say - you have no control over it and a competitor could sabotage you.
That's the official line, I don't believe it, nor do a number of other people.
I know for a fact that I could drop a site out of the results page fairly easily by doing something similar to that. I know becuase we've done it to ourselves accidentally in the past : )
Another point of interest is that the rate at which links to you build up is also of importance. If you can get 5,000 links to your site overnight (Which can be done), don't do it! Not unless you can sustain that rate of growth (ie, get 5000 every day). It's much better to get 25 day for a period of 200 days. Anything that looks unnatural or unorganic in googles eyes wont be helpful to you.
Sorry, going way off topic here.
multilingual
7th October 2005, 11:12
Off topic, but good stuff all the same.
Thanks
JB
multilingual
7th October 2005, 16:12
::Stop Press::
I have found a site selling software that claims to be able to encrypt the html so that no one can view the source code.
They say that:
"TagsLock Pro offers the easiest way to organize HTML password protection for website content. It can also process web pages with JavaScript or VBScript. The protection helps you to hide the source code of HTML and keep your intellectual property on Web. Protected pages cannot be hacked by website grabbers and cannot be processed by
spamware tools."
http://www.aerotags.com/products/tlp.php
Anyone got any thoughts?
JB
webit
7th October 2005, 16:46
I like one of the things listed in their CGI generated page is the feature that if you save the page you wont be able to view the document. Viewing in textpad show why. The first line is:
<script>if(window.location.href.substring(0,4)!='http')win dow.location = 'http://www.atompark.com';</script><script>
Also, for the most part to hide the source it's just using javascript:
document.write(unescape('%3c%61%20href%3d%27http:/%2fwww.atom'+'p%61rk.com blah blah ...
which most people could work around given time (or a script!)
webit
7th October 2005, 16:46
That was an 'ironic' like by the way....
The nature of http is that it's an open system. Thats how it works. A stream is generated and gets sent to your browser (or device) and there's nothing you can do to change that (unless over SSL but thats different as it's encrypted only while in transit). You can hide it but still decrypt it with a simple bit of code.
Also, what the're proposing (ie encrypting your links) would kill you SEO. If you want the best of both worlds generate it from a database and remove all white space so one long line is generated. Aint no-one who's going to sit down and break that down (though they could still down load the page to their harddrive and tidy with DreamWeaver, JEdit, TextPad, HTMLTidy etc)
multilingual
7th October 2005, 17:02
Fair comments, and I will have to bow to your greater knowledge.
Taking out all the blank spaces and leaving one long line of script is a nice option, but might be a bit tedious for me.
Let's assume that I bought this software and integrated it into my site, would the average Joe Sitebuilder have enough knowledge, or time, to be able to find a way around it?
It would probably stop most people wouldn't it?
They do say that it will not effect the Google listings, but I don't want to mess about with it even if there is a slight chance of being dropped.
JB