right sided pain under the ribs is most likely to be due to gall bladder infection u should immediately go to an ER & please do not neglect it or go for self remedies
i am deffinately no doctor, but i have had pain before that is on my right side and is so unbearable i can not move. This is happened numerous times to me and 3 of the times i have been sent to the ER. Every time the first possible diagnosis is Appendicitis. Which is where your appendix is appears swollen on a cat scan and needs to be removed because it is going to rupture. Everytime i have had this pain i have been diagnosed with mesenteric adintis, which is when glands around the intestines are swollen. The pain is extremely bad. If i were you i would make an appointment with your doctor if the pain does not go away, especially if the pain is very bad, because something could be wrong. Good luck!
If the pain is located just under rib cage it may be your pancreas. It hurts really bad, so bad it will bring tears to your eyes. It will last around a week and almost drive you insane. It does not let up. I suggest seeing Doctor for blood work and pain medication. I ended up in the emergency due to length of constant pain. I am right now having a flair up but I know more on what to do. Bed, short breaths and rest. 3 days it moved to left side and is now gone. Part of the disease. I guess. Remember call your doctor and be smart, not like me. If you have more questions please feel free to write, Ted