Welcome to WebmasterWorld Guest from 54.163.49.19

Message Too Old, No Replies

Can hiding the source code harm rankings?

     
6:44 pm on Jul 29, 2013 (gmt 0)

Moderator from US 

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 28, 2004
posts: 3115
votes: 2


We just inherited a website where the previous developer had added some code to the entire site that blocked the ability to view the source code. My question is, can this be detrimental to rankings? The website has many problems, this is just one of them.
7:38 am on July 30, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Source code can always be viewed. Save the page locally then open it with a text editor.

If instead of "can't be viewed" you mean it "has been encoded" then the decoding might not work in all browsers and adds a significant processing overhead that slows the site down.

If search engines cannot read the HTML code, they cannot understand the content and will fail to rank the site. If the pages are encoded, they'll just index it as random junk or may yet suspect a "trick" and penalise it.
8:53 am on July 30, 2013 (gmt 0)

Preferred Member

5+ Year Member

joined:Nov 16, 2010
posts:533
votes: 0


are you refering to the webpage html or server side code? i.e php/asp/.net
1:16 pm on July 30, 2013 (gmt 0)

Moderator from US 

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 28, 2004
posts: 3115
votes: 2


This is a script on the webpage itself. It disables the save/save as command and the view source command, it has not been encoded. I discovered this after ftp'ing into the site and retrieving the page.

We are of course going to remove this script, but I was just curious to how the search engines might treat it.
1:32 pm on July 30, 2013 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:997
votes: 48


Fetch as Googlebot from WMT.
1:37 pm on July 30, 2013 (gmt 0)

Moderator from US 

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 28, 2004
posts: 3115
votes: 2


FranticFish, thanks, never thought about that. Googlebot is showing success.
4:52 pm on July 30, 2013 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:997
votes: 48


It's always worked for me. I think it's because the browser HAS to receive the code to render the page, and only once the page is rendered can those scripts work to disable certain functions within the browser.

As g1smd said, it's completely daft anyway because it offers no real protection!
5:42 pm on July 30, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


typically this is done by using javascript to mess with the contextual menu.
if you temporarily turn off javascript you can view source.